mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-06 02:38:11 +01:00
ui: Split wallet page
This commit is contained in:
@@ -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']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user