aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 18:50:18 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 18:50:18 +0800
commitabd6fbfa648a540342d9c183fc8f5b36248b6055 (patch)
tree2333fe071786082e69cf3b1a0f12918faaa08ff8 /src
parent33cf004b2927f1ddb68e370f211264a132e64544 (diff)
downloaddexon-sol-tools-abd6fbfa648a540342d9c183fc8f5b36248b6055.tar
dexon-sol-tools-abd6fbfa648a540342d9c183fc8f5b36248b6055.tar.gz
dexon-sol-tools-abd6fbfa648a540342d9c183fc8f5b36248b6055.tar.bz2
dexon-sol-tools-abd6fbfa648a540342d9c183fc8f5b36248b6055.tar.lz
dexon-sol-tools-abd6fbfa648a540342d9c183fc8f5b36248b6055.tar.xz
dexon-sol-tools-abd6fbfa648a540342d9c183fc8f5b36248b6055.tar.zst
dexon-sol-tools-abd6fbfa648a540342d9c183fc8f5b36248b6055.zip
Use variable name in assertin message
Diffstat (limited to 'src')
-rw-r--r--src/utils/assert.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts
index 5b4a6fca6..aee53f30c 100644
--- a/src/utils/assert.ts
+++ b/src/utils/assert.ts
@@ -29,11 +29,12 @@ export const assert = {
async isSenderAddressHexAsync(variableName: string, senderAddress: string,
web3Wrapper: Web3Wrapper): Promise<void> {
assert.isETHAddressHex(variableName, senderAddress);
- await assert.isSenderAddressAvailableAsync(web3Wrapper, senderAddress);
+ await assert.isSenderAddressAvailableAsync(web3Wrapper, variableName, senderAddress);
},
- async isSenderAddressAvailableAsync(web3Wrapper: Web3Wrapper, senderAddress: string): Promise<void> {
+ async isSenderAddressAvailableAsync(web3Wrapper: Web3Wrapper, variableName: string,
+ senderAddress: string): Promise<void> {
const isSenderAddressAvailable = await web3Wrapper.isSenderAddressAvailableAsync(senderAddress);
- assert.assert(isSenderAddressAvailable, `Specified sender account ${senderAddress} isn't available through the \
+ assert.assert(isSenderAddressAvailable, `Specified ${variableName} ${senderAddress} isn't available through the \
supplied web3 instance`);
},
isNumber(variableName: string, value: number): void {