Skip to content

Commit

Permalink
feat(core): remove deprecated path
Browse files Browse the repository at this point in the history
  • Loading branch information
onvej-sl committed Dec 4, 2024
1 parent fbea03b commit c9adb55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions legacy/firmware/.changelog.d/4396.changed.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove deprecated Unchained Capital's multisig path.
12 changes: 1 addition & 11 deletions legacy/firmware/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,17 +562,7 @@ bool coin_path_check(const CoinInfo *coin, InputScriptType script_type,
valid = valid && (address_n[2] <= PATH_MAX_CHANGE);
valid = valid && (address_n[3] <= PATH_MAX_ADDRESS_INDEX);
} else if (address_n_count == 5) {
if (address_n[1] & PATH_HARDENED) {
// Unchained Capital compatibility pattern. Will be removed in the
// future.
// m / 45' / coin_type' / account' / [0-1000000] / address_index
valid = valid && check_cointype(coin, address_n[1], full_check);
valid = valid && (address_n[2] & PATH_HARDENED);
valid =
valid && ((address_n[2] & PATH_UNHARDEN_MASK) <= PATH_MAX_ACCOUNT);
valid = valid && (address_n[3] <= 1000000);
valid = valid && (address_n[4] <= PATH_MAX_ADDRESS_INDEX);
} else {
if ((address_n[1] & PATH_HARDENED) == 0) {
// Casa proposed "universal multisig" pattern with unhardened parts.
// m/45'/coin_type/account/change/address_index
valid = valid &&
Expand Down

0 comments on commit c9adb55

Please sign in to comment.