ui: Split wallet page

This commit is contained in:
tecnovert
2022-01-23 14:00:28 +02:00
parent 1c09a8b79e
commit f90a96d9ca
11 changed files with 344 additions and 76 deletions

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2019-2021 tecnovert
# Copyright (c) 2019-2022 tecnovert
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
@@ -207,6 +207,20 @@ chainparams = {
}
ticker_map = {}
for c, params in chainparams.items():
ticker_map[params['ticker'].lower()] = c
def getCoinIdFromTicker(ticker):
try:
return ticker_map[ticker.lower()]
except Exception:
raise ValueError('Unknown coin')
class CoinInterface:
def __init__(self, network):
self.setDefaults()
@@ -235,6 +249,10 @@ class CoinInterface:
ticker = 'rt' + ticker
return ticker
def ticker_mainnet(self):
ticker = chainparams[self.coin_type()]['ticker']
return ticker
def min_amount(self):
return chainparams[self.coin_type()][self._network]['min_amount']