diff options
author | Jacob Evans <jacob@dekz.net> | 2018-04-10 12:39:43 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-04-10 12:39:43 +0800 |
commit | 84a4b7d1c16d008ffbf07ba5b22c61b025b5165f (patch) | |
tree | 54b6156824c31df39159f78cd306f0b8d2e26dc4 /packages/subproviders/test/unit | |
parent | 5b69cd4a22ce1720f4441aaa74c86f895015c0fd (diff) | |
download | dexon-0x-contracts-84a4b7d1c16d008ffbf07ba5b22c61b025b5165f.tar.gz dexon-0x-contracts-84a4b7d1c16d008ffbf07ba5b22c61b025b5165f.tar.zst dexon-0x-contracts-84a4b7d1c16d008ffbf07ba5b22c61b025b5165f.zip |
Refactor ledger to support multiple accounts with from address
Diffstat (limited to 'packages/subproviders/test/unit')
-rw-r--r-- | packages/subproviders/test/unit/ledger_subprovider_test.ts | 8 | ||||
-rw-r--r-- | packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/packages/subproviders/test/unit/ledger_subprovider_test.ts b/packages/subproviders/test/unit/ledger_subprovider_test.ts index c18506681..d3a3fbe26 100644 --- a/packages/subproviders/test/unit/ledger_subprovider_test.ts +++ b/packages/subproviders/test/unit/ledger_subprovider_test.ts @@ -132,7 +132,7 @@ describe('LedgerSubprovider', () => { const payload = { jsonrpc: '2.0', method: 'eth_sign', - params: ['0x0000000000000000000000000000000000000000', messageHex], + params: [FAKE_ADDRESS, messageHex], id: 1, }; const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => { @@ -149,7 +149,7 @@ describe('LedgerSubprovider', () => { const payload = { jsonrpc: '2.0', method: 'personal_sign', - params: [messageHex, '0x0000000000000000000000000000000000000000'], + params: [messageHex, FAKE_ADDRESS], id: 1, }; const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => { @@ -190,7 +190,7 @@ describe('LedgerSubprovider', () => { const payload = { jsonrpc: '2.0', method: 'eth_sign', - params: ['0x0000000000000000000000000000000000000000', nonHexMessage], + params: [FAKE_ADDRESS, nonHexMessage], id: 1, }; const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => { @@ -205,7 +205,7 @@ describe('LedgerSubprovider', () => { const payload = { jsonrpc: '2.0', method: 'personal_sign', - params: [nonHexMessage, '0x0000000000000000000000000000000000000000'], + params: [nonHexMessage, FAKE_ADDRESS], id: 1, }; const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => { diff --git a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts index 7aaef4944..16981cf86 100644 --- a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts +++ b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts @@ -28,9 +28,12 @@ describe('MnemonicWalletSubprovider', () => { }); describe('direct method calls', () => { describe('success cases', () => { - it('returns the account', async () => { + it('returns the accounts', async () => { const accounts = await subprovider.getAccountsAsync(); + // tslint:disable-next-line:no-console + console.log(accounts); expect(accounts[0]).to.be.equal(fixtureData.TEST_RPC_ACCOUNT_0); + expect(accounts[1]).to.be.equal(fixtureData.TEST_RPC_ACCOUNT_1); expect(accounts.length).to.be.equal(10); }); it('signs a personal message', async () => { |