Skip to content

Commit

Permalink
Merge pull request #25 from marmarachain/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
marmarachain authored Jan 20, 2022
2 parents 45bcbeb + a4281d6 commit 9fabda8
Show file tree
Hide file tree
Showing 10 changed files with 527 additions and 332 deletions.
2 changes: 1 addition & 1 deletion requirements
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip==21.3.1
fbs==0.9.0
fbs==1.0.3
qrcode==7.2
paramiko==2.7.2
protobuf==3.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/build/settings/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"app_name": "MarmaraConnector",
"author": "Marmara Credit Loops",
"main_module": "src/main/python/mainApp.py",
"version": "0.3.6-alpha",
"version": "0.3.7",
"public_settings": ["app_name", "author", "version"]
}
14 changes: 7 additions & 7 deletions src/main/python/api_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ def latest_app_release_url():

def get_marmara_stats():
try:
response = requests.get('https://explorer3.marmara.io/insight-api-komodo/stats', timeout=5)
response = requests.get('https://explorer.marmara.io/insight-api-komodo/stats', timeout=5)
return response.json()
except Exception:
try:
response = requests.get('https://explorer2.marmara.io/insight-api-komodo/stats', timeout=5)
return response.json()
except Exception:
try:
response = requests.get('https://explorer.marmara.io/insight-api-komodo/stats', timeout=5)
response = requests.get('https://explorer3.marmara.io/insight-api-komodo/stats', timeout=5)
return response.json()
except Exception as e:
logging.error(e)
Expand All @@ -84,9 +84,9 @@ def mcl_exchange_market(api_list_key):


def get_blocks_details(block, hash):
api_url_list = ['https://explorer3.marmara.io/insight-api-komodo/blocks',
api_url_list = ['https://explorer.marmara.io/insight-api-komodo/blocks',
'https://explorer2.marmara.io/insight-api-komodo/blocks',
'https://explorer.marmara.io/insight-api-komodo/blocks']
'https://explorer3.marmara.io/insight-api-komodo/blocks']
result_lists = []
for api_url in api_url_list:
try:
Expand All @@ -97,7 +97,7 @@ def get_blocks_details(block, hash):
previous_hash_e = None
for item in response_json:
index = response_json.index(item)
if int(item.get('height')) == int(block):
if int(item.get('height')) == int(block) and item.get('isMainChain') == True:
block_e = item.get('height')
hash_e = item.get('hash')
previous_hash_e = response_json[index+1].get('hash')
Expand Down Expand Up @@ -126,9 +126,9 @@ def get_blocks_details(block, hash):


def get_block_hash(hash, index):
api_url_list = ['https://explorer3.marmara.io/insight-api-komodo/block/' + hash,
api_url_list = ['https://explorer.marmara.io/insight-api-komodo/block/' + hash,
'https://explorer2.marmara.io/insight-api-komodo/block/' + hash,
'https://explorer.marmara.io/insight-api-komodo/block/' + hash]
'https://explorer3.marmara.io/insight-api-komodo/block/' + hash]
try:
response_e = requests.get(api_url_list[index], timeout=15)
return response_e.json()
Expand Down
2 changes: 1 addition & 1 deletion src/main/python/chain_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
windows_d = 'komodod.exe -ac_name=MCL '
linux_cli = './komodo-cli -ac_name=MCL '
windows_cli = 'komodo-cli.exe -ac_name=MCL '
marmarad = '-ac_supply=2000000 -ac_cc=2 -addnode=37.148.210.158 -addnode=37.148.212.36 -addnode=149.202.158.145 -addressindex=1 -spentindex=1 -ac_marmara=1 -ac_staked=75 -ac_reward=3000000000'
marmarad = '-ac_supply=2000000 -ac_cc=2 -addnode=161.97.146.150 -addnode=5.189.149.242 -addnode=149.202.158.145 -addressindex=1 -spentindex=1 -ac_marmara=1 -ac_staked=75 -ac_reward=3000000000'
getinfo = "getinfo"
validateaddress = 'validateaddress'
getaddressesbyaccount = 'getaddressesbyaccount'
Expand Down
13 changes: 13 additions & 0 deletions src/main/python/mainApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def __init__(self, parent=None):
self.newaddress_button.clicked.connect(self.get_new_address)
self.address_seed_button.clicked.connect(self.convertpassphrase)
self.addresspage_back_button.clicked.connect(self.back_chain_widget_index)
self.new_address_frame.setEnabled(False)
self.add_with_seed_radiobutton.clicked.connect(self.change_address_frame_visibility)
self.add_without_seed_radiobutton.clicked.connect(self.change_address_frame_visibility)
# - private key page ----
self.importprivkey_button.clicked.connect(self.importprivkey)
self.privatekeypage_back_button.clicked.connect(self.back_chain_widget_index)
Expand Down Expand Up @@ -1510,6 +1513,16 @@ def update_chain_finished(self):
# Chain --- wallet Address Add, import
# -------------------
@pyqtSlot()

def change_address_frame_visibility(self):
if self.add_with_seed_radiobutton.isChecked():
self.new_address_frame.setEnabled(False)
self.add_seed_address_frame.setEnabled(True)
if self.add_without_seed_radiobutton.isChecked():
self.new_address_frame.setEnabled(True)
self.add_seed_address_frame.setEnabled(False)

@pyqtSlot()
def get_address_page(self):
self.chain_stackedWidget.setCurrentIndex(1)
self.passphrase_TextEdit.clear()
Expand Down
Loading

0 comments on commit 9fabda8

Please sign in to comment.