mirror of
https://github.com/basicswap/basicswap.git
synced 2025-01-08 19:59:33 +00:00
Add display_name to chainparams.
This commit is contained in:
parent
5ee28d0aa3
commit
b43c159dc4
4 changed files with 6 additions and 9 deletions
|
@ -280,13 +280,13 @@ chainparams = {
|
|||
Coins.PIVX: {
|
||||
'name': 'pivx',
|
||||
'ticker': 'PIVX',
|
||||
'display_name': 'PIVX',
|
||||
'message_magic': 'DarkNet Signed Message:\n',
|
||||
'blocks_target': 60 * 1,
|
||||
'decimal_places': 8,
|
||||
'has_cltv': True,
|
||||
'has_csv': False,
|
||||
'has_segwit': False,
|
||||
'use_ticker_as_name': True,
|
||||
'mainnet': {
|
||||
'rpcport': 51473,
|
||||
'pubkey_address': 30,
|
||||
|
@ -437,6 +437,7 @@ chainparams = {
|
|||
Coins.BCH: {
|
||||
'name': 'bitcoincash',
|
||||
'ticker': 'BCH',
|
||||
'display_name': 'Bitcoin Cash',
|
||||
'message_magic': 'Bitcoin Signed Message:\n',
|
||||
'blocks_target': 60 * 2,
|
||||
'decimal_places': 8,
|
||||
|
|
|
@ -66,10 +66,8 @@ class CoinInterface:
|
|||
|
||||
def coin_name(self) -> str:
|
||||
coin_chainparams = chainparams[self.coin_type()]
|
||||
if coin_chainparams.get('use_ticker_as_name', False):
|
||||
return coin_chainparams['ticker']
|
||||
if coin_chainparams['name'] == 'bitcoincash':
|
||||
return 'Bitcoin Cash'
|
||||
if 'display_name' in coin_chainparams:
|
||||
return coin_chainparams['display_name']
|
||||
return coin_chainparams['name'].capitalize()
|
||||
|
||||
def ticker(self) -> str:
|
||||
|
|
|
@ -95,8 +95,6 @@ class LTCInterfaceMWEB(LTCInterface):
|
|||
|
||||
def coin_name(self) -> str:
|
||||
coin_chainparams = chainparams[Coins.LTC]
|
||||
if coin_chainparams.get('use_ticker_as_name', False):
|
||||
return coin_chainparams['ticker'] + ' MWEB'
|
||||
return coin_chainparams['name'].capitalize() + ' MWEB'
|
||||
|
||||
def ticker(self) -> str:
|
||||
|
|
|
@ -435,8 +435,8 @@ def getCoinName(c):
|
|||
return chainparams[Coins.LTC]['name'].capitalize() + ' MWEB'
|
||||
|
||||
coin_chainparams = chainparams[c]
|
||||
if coin_chainparams.get('use_ticker_as_name', False):
|
||||
return coin_chainparams['ticker']
|
||||
if 'display_name' in coin_chainparams:
|
||||
return coin_chainparams['display_name']
|
||||
return coin_chainparams['name'].capitalize()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue