aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 20:29:07 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 20:29:07 +0800
commitef57dd22e29057e5bd84b9a0ad36a123126695df (patch)
tree842046644e21ec46c7e12315c8b3dc9f94e75c40 /src/utils
parent8103a6cedda2646405c8cfd644c609cf3e4a84cb (diff)
downloaddexon-sol-tools-ef57dd22e29057e5bd84b9a0ad36a123126695df.tar
dexon-sol-tools-ef57dd22e29057e5bd84b9a0ad36a123126695df.tar.gz
dexon-sol-tools-ef57dd22e29057e5bd84b9a0ad36a123126695df.tar.bz2
dexon-sol-tools-ef57dd22e29057e5bd84b9a0ad36a123126695df.tar.lz
dexon-sol-tools-ef57dd22e29057e5bd84b9a0ad36a123126695df.tar.xz
dexon-sol-tools-ef57dd22e29057e5bd84b9a0ad36a123126695df.tar.zst
dexon-sol-tools-ef57dd22e29057e5bd84b9a0ad36a123126695df.zip
Rename isSenderAddressHexAsync to isSenderAddressAsync
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/assert.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts
index aee53f30c..621c11eda 100644
--- a/src/utils/assert.ts
+++ b/src/utils/assert.ts
@@ -26,16 +26,16 @@ export const assert = {
const web3 = new Web3();
this.assert(web3.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value));
},
- async isSenderAddressHexAsync(variableName: string, senderAddress: string,
- web3Wrapper: Web3Wrapper): Promise<void> {
- assert.isETHAddressHex(variableName, senderAddress);
- await assert.isSenderAddressAvailableAsync(web3Wrapper, variableName, senderAddress);
+ async isSenderAddressAsync(variableName: string, senderAddressHex: string,
+ web3Wrapper: Web3Wrapper): Promise<void> {
+ assert.isETHAddressHex(variableName, senderAddressHex);
+ await assert.isSenderAddressAvailableAsync(web3Wrapper, variableName, senderAddressHex);
},
async isSenderAddressAvailableAsync(web3Wrapper: Web3Wrapper, variableName: string,
- senderAddress: string): Promise<void> {
- const isSenderAddressAvailable = await web3Wrapper.isSenderAddressAvailableAsync(senderAddress);
- assert.assert(isSenderAddressAvailable, `Specified ${variableName} ${senderAddress} isn't available through the \
- supplied web3 instance`);
+ senderAddressHex: string): Promise<void> {
+ const isSenderAddressAvailable = await web3Wrapper.isSenderAddressAvailableAsync(senderAddressHex);
+ assert.assert(isSenderAddressAvailable, `Specified ${variableName} ${senderAddressHex} isn't available \
+ through the supplied web3 instance`);
},
isNumber(variableName: string, value: number): void {
this.assert(_.isFinite(value), this.typeAssertionMessage(variableName, 'number', value));