Update abstract-wallet.ts

This commit is contained in:
Marcos Rodriguez Vélez 2021-09-28 10:31:23 -04:00 committed by Overtorment
parent d7e8373347
commit bbde3b6b59

View File

@ -261,7 +261,9 @@ export class AbstractWallet {
this.secret = parsedSecret.ExtPubKey;
const mfp = Buffer.from(parsedSecret.MasterFingerprint, 'hex').reverse().toString('hex');
this.masterFingerprint = parseInt(mfp, 16);
this._derivationPath = parsedSecret.AccountKeyPath.startsWith('m/') ? parsedSecret.AccountKeyPath : `m/${parsedSecret.AccountKeyPath}`;
this._derivationPath = parsedSecret.AccountKeyPath.startsWith('m/')
? parsedSecret.AccountKeyPath
: `m/${parsedSecret.AccountKeyPath}`;
if (parsedSecret.CoboVaultFirmwareVersion) this.use_with_hardware_wallet = true;
}
} catch (_) {}