From c06761882827abb2802b27d75a10504fe970da74 Mon Sep 17 00:00:00 2001 From: Andrew Kozlik Date: Thu, 24 Jun 2021 11:11:01 +0200 Subject: [PATCH] fix(common): Fix incorrect SLIP-44 coin type for Bgold and SmartCash Testnets. --- common/defs/bitcoin/bgold_testnet.json | 2 +- common/defs/bitcoin/smartcash_testnet.json | 2 +- core/.changelog.d/noissue.security.2 | 1 + core/src/apps/common/coininfo.py | 4 ++-- legacy/firmware/.changelog.d/noissue.security.2 | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 core/.changelog.d/noissue.security.2 create mode 100644 legacy/firmware/.changelog.d/noissue.security.2 diff --git a/common/defs/bitcoin/bgold_testnet.json b/common/defs/bitcoin/bgold_testnet.json index 4c4dd8c2e..a4908afff 100644 --- a/common/defs/bitcoin/bgold_testnet.json +++ b/common/defs/bitcoin/bgold_testnet.json @@ -21,7 +21,7 @@ "xpub_magic_multisig_segwit_native": 70617039, "bech32_prefix": "tbtg", "cashaddr_prefix": null, - "slip44": 156, + "slip44": 1, "segwit": true, "decred": false, "fork_id": 79, diff --git a/common/defs/bitcoin/smartcash_testnet.json b/common/defs/bitcoin/smartcash_testnet.json index 16cdee8f6..94caa5e1d 100644 --- a/common/defs/bitcoin/smartcash_testnet.json +++ b/common/defs/bitcoin/smartcash_testnet.json @@ -21,7 +21,7 @@ "xpub_magic_multisig_segwit_native": null, "bech32_prefix": null, "cashaddr_prefix": null, - "slip44": 224, + "slip44": 1, "segwit": false, "decred": false, "fork_id": null, diff --git a/core/.changelog.d/noissue.security.2 b/core/.changelog.d/noissue.security.2 new file mode 100644 index 000000000..6c34e3650 --- /dev/null +++ b/core/.changelog.d/noissue.security.2 @@ -0,0 +1 @@ +Ensure that all testnet coins use SLIP-44 coin type 1. diff --git a/core/src/apps/common/coininfo.py b/core/src/apps/common/coininfo.py index 0d532028e..620adc8aa 100644 --- a/core/src/apps/common/coininfo.py +++ b/core/src/apps/common/coininfo.py @@ -390,7 +390,7 @@ def by_name(name: str) -> CoinInfo: xpub_magic_multisig_segwit_native=0x043587cf, bech32_prefix="tbtg", cashaddr_prefix=None, - slip44=156, + slip44=1, segwit=True, fork_id=79, force_bip143=True, @@ -1482,7 +1482,7 @@ def by_name(name: str) -> CoinInfo: xpub_magic_multisig_segwit_native=None, bech32_prefix=None, cashaddr_prefix=None, - slip44=224, + slip44=1, segwit=False, fork_id=None, force_bip143=False, diff --git a/legacy/firmware/.changelog.d/noissue.security.2 b/legacy/firmware/.changelog.d/noissue.security.2 new file mode 100644 index 000000000..6c34e3650 --- /dev/null +++ b/legacy/firmware/.changelog.d/noissue.security.2 @@ -0,0 +1 @@ +Ensure that all testnet coins use SLIP-44 coin type 1.