Merge pull request #2371 from BlueWallet/fix-2366

FIX: Import Multisig from Specter Desktop - Fingerprint is Incorrect …
This commit is contained in:
GLaDOS 2020-12-16 17:22:22 +00:00 committed by GitHub
commit 1de53071e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -579,7 +579,7 @@ export class MultisigHDWallet extends AbstractHDElectrumWallet {
if (m && m.length === 3) {
let hexFingerprint = m[1].split('/')[0];
if (hexFingerprint.length === 8) {
hexFingerprint = Buffer.from(hexFingerprint, 'hex').reverse().toString('hex');
hexFingerprint = Buffer.from(hexFingerprint, 'hex').toString('hex');
}
const path = 'm/' + m[1].split('/').slice(1).join('/').replace(/[h]/g, "'");

View File

@ -1487,9 +1487,9 @@ describe('multisig-wallet (native segwit)', () => {
assert.ok(w.isNativeSegwit());
assert.ok(!w.isLegacy());
assert.strictEqual(w.getFingerprint(1), '2D440411');
assert.strictEqual(w.getFingerprint(2), 'F863CE8C');
assert.strictEqual(w.getFingerprint(3), '7BBD27BF');
assert.strictEqual(w.getFingerprint(1), '1104442D');
assert.strictEqual(w.getFingerprint(2), '8CCE63F8');
assert.strictEqual(w.getFingerprint(3), 'BF27BD7B');
assert.strictEqual(
w.getCosigner(1),