ui: Use coin tickers as wallet keys in json/wallets

This commit is contained in:
tecnovert
2022-07-25 22:56:14 +02:00
parent 18a444b071
commit cd5af7032f
15 changed files with 58 additions and 40 deletions

View File

@@ -5361,11 +5361,12 @@ class BasicSwap(BaseApp):
if c not in chainparams:
continue
if self.coin_clients[c]['connection_type'] == 'rpc':
key = chainparams[c]['ticker'] if opts.get('ticker_key', False) else c
try:
rv[c] = self.getWalletInfo(c)
rv[c].update(self.getBlockchainInfo(c))
rv[key] = self.getWalletInfo(c)
rv[key].update(self.getBlockchainInfo(c))
except Exception as ex:
rv[c] = {'name': chainparams[c]['name'].capitalize(), 'error': str(ex)}
rv[key] = {'name': chainparams[c]['name'].capitalize(), 'error': str(ex)}
return rv
def getCachedWalletsInfo(self, opts=None):