diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-06 16:25:28 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-06 16:25:28 +0800 |
commit | 2a080427278d040d2e978ceb806e61818f13ae2f (patch) | |
tree | 00049cabbfb7cef858bf19efefbaf0c83c5d7c5f /src/utils/assert.ts | |
parent | bac6833436960d2a7eb50d89e94fed226a16008b (diff) | |
download | dexon-sol-tools-2a080427278d040d2e978ceb806e61818f13ae2f.tar dexon-sol-tools-2a080427278d040d2e978ceb806e61818f13ae2f.tar.gz dexon-sol-tools-2a080427278d040d2e978ceb806e61818f13ae2f.tar.bz2 dexon-sol-tools-2a080427278d040d2e978ceb806e61818f13ae2f.tar.lz dexon-sol-tools-2a080427278d040d2e978ceb806e61818f13ae2f.tar.xz dexon-sol-tools-2a080427278d040d2e978ceb806e61818f13ae2f.tar.zst dexon-sol-tools-2a080427278d040d2e978ceb806e61818f13ae2f.zip |
Add variableName to isSenderAddcountHexAsync
Diffstat (limited to 'src/utils/assert.ts')
-rw-r--r-- | src/utils/assert.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts index 2396b8534..0f45a62ff 100644 --- a/src/utils/assert.ts +++ b/src/utils/assert.ts @@ -26,13 +26,14 @@ export const assert = { const web3 = new Web3(); this.assert(web3.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value)); }, - async isSenderAccountHexAsync(web3Wrapper: Web3Wrapper, senderAccount: string): Promise<void> { - assert.isETHAddressHex('senderAccount', senderAccount); + async isSenderAccountHexAsync(variableName: string, senderAccount: string, + web3Wrapper: Web3Wrapper): Promise<void> { + assert.isETHAddressHex(variableName, senderAccount); await assert.isSenderAccountAvailableAsync(web3Wrapper, senderAccount); }, async isSenderAccountAvailableAsync(web3Wrapper: Web3Wrapper, senderAccount: string): Promise<void> { const isSenderAddressAvailable = await web3Wrapper.isSenderAddressAvailableAsync(senderAccount); - assert.assert(isSenderAddressAvailable, `Specified senderAccount ${senderAccount} isn't available through the \ + assert.assert(isSenderAddressAvailable, `Specified sender account ${senderAccount} isn't available through the \ supplied web3 instance`); }, isNumber(variableName: string, value: number): void { |