Skip to content

Commit

Permalink
core: allow spending coins from Bitcoin paths if the coin ...
Browse files Browse the repository at this point in the history
has implemented strong replay protection via SIGHASH_FORKID
  • Loading branch information
prusnak committed Aug 15, 2020
1 parent 837817d commit 41b0038
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/apps/bitcoin/keychain.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ def get_namespaces_for_coin(coin: coininfo.CoinInfo):
# m/0x4741b11e/6/pointer
namespaces.append([0x4741B11E])

# some wallets such as Electron-Cash (BCH) store coins on Bitcoin paths
# we can allow spending these coins from Bitcoin paths if the coin has
# implemented strong replay protection via SIGHASH_FORKID
if coin.fork_id is not None:
namespaces.append([44 | HARDENED, 0])
namespaces.append([48 | HARDENED, 0])
if coin.segwit:
namespaces.append([49 | HARDENED, 0])
namespaces.append([84 | HARDENED, 0])

return namespaces


Expand Down

0 comments on commit 41b0038

Please sign in to comment.