Add display_name to chainparams.

This commit is contained in:
tecnovert 2024-11-02 14:19:10 +02:00
parent 5ee28d0aa3
commit b43c159dc4
No known key found for this signature in database
GPG key ID: 8ED6D8750C4E3F93
4 changed files with 6 additions and 9 deletions

View file

@ -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,

View file

@ -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:

View file

@ -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:

View file

@ -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()