diff options
author | Jacob Evans <jacob@dekz.net> | 2018-04-11 10:56:52 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-04-11 10:56:52 +0800 |
commit | 65b2c936abdf3a67d471cd17eeed5069825ac3d4 (patch) | |
tree | cdf8a2d570809fce6a7daac9790000ee99f86b83 /packages/subproviders/test/unit | |
parent | eee190826a44dfe5444f15165577ea73b4f78c2f (diff) | |
download | dexon-sol-tools-65b2c936abdf3a67d471cd17eeed5069825ac3d4.tar dexon-sol-tools-65b2c936abdf3a67d471cd17eeed5069825ac3d4.tar.gz dexon-sol-tools-65b2c936abdf3a67d471cd17eeed5069825ac3d4.tar.bz2 dexon-sol-tools-65b2c936abdf3a67d471cd17eeed5069825ac3d4.tar.lz dexon-sol-tools-65b2c936abdf3a67d471cd17eeed5069825ac3d4.tar.xz dexon-sol-tools-65b2c936abdf3a67d471cd17eeed5069825ac3d4.tar.zst dexon-sol-tools-65b2c936abdf3a67d471cd17eeed5069825ac3d4.zip |
Tests for signed transactions and multiple accounts
Diffstat (limited to 'packages/subproviders/test/unit')
-rw-r--r-- | packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts index aacaef9f4..2bc84abc1 100644 --- a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts +++ b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts @@ -48,6 +48,11 @@ describe('MnemonicWalletSubprovider', () => { const txHex = await subprovider.signTransactionAsync(fixtureData.TX_DATA); expect(txHex).to.be.equal(fixtureData.TX_DATA_SIGNED_RESULT); }); + it('signs a transaction with the second address', async () => { + const txData = { ...fixtureData.TX_DATA, from: fixtureData.TEST_RPC_ACCOUNT_1 }; + const txHex = await subprovider.signTransactionAsync(txData); + expect(txHex).to.be.equal(fixtureData.TX_DATA_ACCOUNT_1_SIGNED_RESULT); + }); }); describe('failure cases', () => { it('throws an error if account cannot be found', async () => { |