Closed katat closed 4 years ago
I noticed the addresses returned the ledgerjs are different from the other existing applications. After looking through the ledgerjs code, I think it could be due to the incorrect use of Uint8Array.from: https://github.com/obsidiansystems/ledgerjs/blob/nervos/packages/hw-app-ckb/src/Ckb.js#L67
ledgerjs
Uint8Array.from
Uint8Array.from("ckb-default-hash")
The result uint8 array actually contains the values:
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
Instead of the encoded values for ckb-default-hash
ckb-default-hash
[99, 107, 98, 45, 100, 101, 102, 97, 117, 108, 116, 45, 104, 97, 115, 104]
This should be fixed in https://github.com/obsidiansystems/ledgerjs/pull/25!
I noticed the addresses returned the
ledgerjs
are different from the other existing applications. After looking through theledgerjs
code, I think it could be due to the incorrect use ofUint8Array.from
: https://github.com/obsidiansystems/ledgerjs/blob/nervos/packages/hw-app-ckb/src/Ckb.js#L67The result uint8 array actually contains the values:
Instead of the encoded values for
ckb-default-hash