Skip to content

Commit

Permalink
fix: tests for HDPrivateKey on store mock
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Werner committed Feb 15, 2022
1 parent 03e4f6e commit 578a1c4
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const { HDPrivateKey, HDPublicKey, PrivateKey } = require("@dashevo/dashcore-lib


const privateKey = new PrivateKey('ee56be968a42e58fda23b83da17f90e002cafbe35a702c2f5598b13fdaa238db', 'testnet')
const hdprivateKey1 = new HDPrivateKey("xprv9s21ZrQH143K39R9Ux28kCBUHcQFdBeVE2CXFVz6GnA2a6pqTsPhHR5QHtMP5ZTRpYkKqc9ifjkJ2V1h318qWsYgyxCBUurRdTNthjgwKMw", 'testnet');
const hdpublicKey1 = new HDPublicKey("xpub661MyMwAqRbcFhaucFQun3ivEyA5gy5NKnjr1xMUVkyqdF3VNNy3TLinwnYMSUye5FF5pDSrn2SPX3zvKRQGrpZ44VVUBeuxuzov7enWpkf",'testnet');
const hdprivateKey1 = new HDPrivateKey("xprv9s21ZrQH143K39R9Ux28kCBUHcQFdBeVE2CXFVz6GnA2a6pqTsPhHR5QHtMP5ZTRpYkKqc9ifjkJ2V1h318qWsYgyxCBUurRdTNthjgwKMw", 'mainnet');
const hdpublicKey1 = new HDPublicKey("xpub661MyMwAqRbcFhaucFQun3ivEyA5gy5NKnjr1xMUVkyqdF3VNNy3TLinwnYMSUye5FF5pDSrn2SPX3zvKRQGrpZ44VVUBeuxuzov7enWpkf",'mainnet');

const keychainPrivate1 = new DerivableKeyChain({privateKey});
const keychainHDPrivate1 = new DerivableKeyChain({HDPrivateKey: hdprivateKey1});
Expand Down Expand Up @@ -133,7 +133,7 @@ const mockSelfPrivateKeyType = {
}
const mockSelfIndex0 = {
storage: { getStore:()=>mockedStore2 },
keyChainStore: keychainStorePrivateKeyWallet,
keyChainStore: keychainStoreHDPrivateKeyWallet,
walletId: '123456789',
walletType: 'hdwallet',
BIP44PATH: `m/44'/1'/0'`
Expand All @@ -149,8 +149,8 @@ describe('TransactionSyncStreamWorker#getAddressesToSync', function suite() {

const addressesIndex0 = getAddressesToSync.call(mockSelfIndex0);
expect(addressesIndex0).to.deep.equal([
'Xpkr9M3DP8RgcWw4SHUW75PYtmU1Lh5Ss2',
'Xp1kwhXoUVHKRKmoXt3dB4i4KhryHSYjtW'
"Xpkr9M3DP8RgcWw4SHUW75PYtmU1Lh5Ss2",
"Xp1kwhXoUVHKRKmoXt3dB4i4KhryHSYjtW"
])

const addressesIndex2 = getAddressesToSync.call(mockSelfPrivateKeyType );
Expand Down

0 comments on commit 578a1c4

Please sign in to comment.