1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-24 15:28:10 +00:00

common/tools: reorder coins in coin_info.py so Regtest appears at the beginning

This commit is contained in:
Pavol Rusnak 2019-08-21 11:05:19 +02:00
parent debb8ec478
commit 0f6e06e1e5
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 24 additions and 24 deletions

View File

@ -491,7 +491,7 @@ def deduplicate_keys(all_coins):
def _btc_sort_key(coin): def _btc_sort_key(coin):
if coin["name"] in ("Bitcoin", "Testnet"): if coin["name"] in ("Bitcoin", "Testnet", "Regtest"):
return "000000" + coin["name"] return "000000" + coin["name"]
else: else:
return coin["name"] return coin["name"]

View File

@ -100,6 +100,29 @@ def by_name(name: str) -> CoinInfo:
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None, confidential_assets=None,
) )
elif name == "Regtest":
return CoinInfo(
coin_name=name,
coin_shortcut="REGTEST",
address_type=111,
address_type_p2sh=196,
maxfee_kb=10000000,
signed_message_header="Bitcoin Signed Message:\n",
xpub_magic=0x043587cf,
xpub_magic_segwit_p2sh=0x044a5262,
xpub_magic_segwit_native=0x045f1cf6,
bech32_prefix="bcrt",
cashaddr_prefix=None,
slip44=1,
segwit=True,
fork_id=None,
force_bip143=False,
bip115=False,
decred=False,
negative_fee=False,
curve_name='secp256k1',
confidential_assets=None,
)
elif name == "Testnet": elif name == "Testnet":
return CoinInfo( return CoinInfo(
coin_name=name, coin_name=name,
@ -1411,29 +1434,6 @@ def by_name(name: str) -> CoinInfo:
curve_name='secp256k1', curve_name='secp256k1',
confidential_assets=None, confidential_assets=None,
) )
elif name == "Regtest":
return CoinInfo(
coin_name=name,
coin_shortcut="REGTEST",
address_type=111,
address_type_p2sh=196,
maxfee_kb=10000000,
signed_message_header="Bitcoin Signed Message:\n",
xpub_magic=0x043587cf,
xpub_magic_segwit_p2sh=0x044a5262,
xpub_magic_segwit_native=0x045f1cf6,
bech32_prefix="bcrt",
cashaddr_prefix=None,
slip44=1,
segwit=True,
fork_id=None,
force_bip143=False,
bip115=False,
decred=False,
negative_fee=False,
curve_name='secp256k1',
confidential_assets=None,
)
elif name == "Ritocoin": elif name == "Ritocoin":
return CoinInfo( return CoinInfo(
coin_name=name, coin_name=name,