diff options
author | Jacob Evans <jacob@dekz.net> | 2018-04-11 10:51:57 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-04-11 10:51:57 +0800 |
commit | eee190826a44dfe5444f15165577ea73b4f78c2f (patch) | |
tree | 75545d1ed9639cd9d8d083644cc7fa1dff720b8f /packages/subproviders/test/unit | |
parent | 20a1deb187d8fb38a42ae87fc8f046dff4b4ba61 (diff) | |
download | dexon-sol-tools-eee190826a44dfe5444f15165577ea73b4f78c2f.tar dexon-sol-tools-eee190826a44dfe5444f15165577ea73b4f78c2f.tar.gz dexon-sol-tools-eee190826a44dfe5444f15165577ea73b4f78c2f.tar.bz2 dexon-sol-tools-eee190826a44dfe5444f15165577ea73b4f78c2f.tar.lz dexon-sol-tools-eee190826a44dfe5444f15165577ea73b4f78c2f.tar.xz dexon-sol-tools-eee190826a44dfe5444f15165577ea73b4f78c2f.tar.zst dexon-sol-tools-eee190826a44dfe5444f15165577ea73b4f78c2f.zip |
Test signed messages with the second account
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 a1a5a2296..aacaef9f4 100644 --- a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts +++ b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts @@ -39,6 +39,11 @@ describe('MnemonicWalletSubprovider', () => { const ecSignatureHex = await subprovider.signPersonalMessageAsync(data, fixtureData.TEST_RPC_ACCOUNT_0); expect(ecSignatureHex).to.be.equal(fixtureData.PERSONAL_MESSAGE_SIGNED_RESULT); }); + it('signs a personal message with second address', async () => { + const data = ethUtils.bufferToHex(ethUtils.toBuffer(fixtureData.PERSONAL_MESSAGE_STRING)); + const ecSignatureHex = await subprovider.signPersonalMessageAsync(data, fixtureData.TEST_RPC_ACCOUNT_1); + expect(ecSignatureHex).to.be.equal(fixtureData.PERSONAL_MESSAGE_ACCOUNT_1_SIGNED_RESULT); + }); it('signs a transaction', async () => { const txHex = await subprovider.signTransactionAsync(fixtureData.TX_DATA); expect(txHex).to.be.equal(fixtureData.TX_DATA_SIGNED_RESULT); |