mirror of
https://github.com/basicswap/basicswap.git
synced 2025-01-24 11:26:01 +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: {
|
Coins.PIVX: {
|
||||||
'name': 'pivx',
|
'name': 'pivx',
|
||||||
'ticker': 'PIVX',
|
'ticker': 'PIVX',
|
||||||
|
'display_name': 'PIVX',
|
||||||
'message_magic': 'DarkNet Signed Message:\n',
|
'message_magic': 'DarkNet Signed Message:\n',
|
||||||
'blocks_target': 60 * 1,
|
'blocks_target': 60 * 1,
|
||||||
'decimal_places': 8,
|
'decimal_places': 8,
|
||||||
'has_cltv': True,
|
'has_cltv': True,
|
||||||
'has_csv': False,
|
'has_csv': False,
|
||||||
'has_segwit': False,
|
'has_segwit': False,
|
||||||
'use_ticker_as_name': True,
|
|
||||||
'mainnet': {
|
'mainnet': {
|
||||||
'rpcport': 51473,
|
'rpcport': 51473,
|
||||||
'pubkey_address': 30,
|
'pubkey_address': 30,
|
||||||
|
@ -437,6 +437,7 @@ chainparams = {
|
||||||
Coins.BCH: {
|
Coins.BCH: {
|
||||||
'name': 'bitcoincash',
|
'name': 'bitcoincash',
|
||||||
'ticker': 'BCH',
|
'ticker': 'BCH',
|
||||||
|
'display_name': 'Bitcoin Cash',
|
||||||
'message_magic': 'Bitcoin Signed Message:\n',
|
'message_magic': 'Bitcoin Signed Message:\n',
|
||||||
'blocks_target': 60 * 2,
|
'blocks_target': 60 * 2,
|
||||||
'decimal_places': 8,
|
'decimal_places': 8,
|
||||||
|
|
|
@ -66,10 +66,8 @@ class CoinInterface:
|
||||||
|
|
||||||
def coin_name(self) -> str:
|
def coin_name(self) -> str:
|
||||||
coin_chainparams = chainparams[self.coin_type()]
|
coin_chainparams = chainparams[self.coin_type()]
|
||||||
if coin_chainparams.get('use_ticker_as_name', False):
|
if 'display_name' in coin_chainparams:
|
||||||
return coin_chainparams['ticker']
|
return coin_chainparams['display_name']
|
||||||
if coin_chainparams['name'] == 'bitcoincash':
|
|
||||||
return 'Bitcoin Cash'
|
|
||||||
return coin_chainparams['name'].capitalize()
|
return coin_chainparams['name'].capitalize()
|
||||||
|
|
||||||
def ticker(self) -> str:
|
def ticker(self) -> str:
|
||||||
|
|
|
@ -95,8 +95,6 @@ class LTCInterfaceMWEB(LTCInterface):
|
||||||
|
|
||||||
def coin_name(self) -> str:
|
def coin_name(self) -> str:
|
||||||
coin_chainparams = chainparams[Coins.LTC]
|
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'
|
return coin_chainparams['name'].capitalize() + ' MWEB'
|
||||||
|
|
||||||
def ticker(self) -> str:
|
def ticker(self) -> str:
|
||||||
|
|
|
@ -435,8 +435,8 @@ def getCoinName(c):
|
||||||
return chainparams[Coins.LTC]['name'].capitalize() + ' MWEB'
|
return chainparams[Coins.LTC]['name'].capitalize() + ' MWEB'
|
||||||
|
|
||||||
coin_chainparams = chainparams[c]
|
coin_chainparams = chainparams[c]
|
||||||
if coin_chainparams.get('use_ticker_as_name', False):
|
if 'display_name' in coin_chainparams:
|
||||||
return coin_chainparams['ticker']
|
return coin_chainparams['display_name']
|
||||||
return coin_chainparams['name'].capitalize()
|
return coin_chainparams['name'].capitalize()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue