aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-04-19 14:54:42 +0800
committerJacob Evans <jacob@dekz.net>2018-04-19 15:16:05 +0800
commit5c232b6a8d3920ed987fcc9b158a17a62a953172 (patch)
tree5b2233a989d8afb9606b09eed81026c253088c5e /packages/contract_templates
parent4bee63afc69b10ee5a9a4aa9279a926068a37242 (diff)
downloaddexon-sol-tools-5c232b6a8d3920ed987fcc9b158a17a62a953172.tar
dexon-sol-tools-5c232b6a8d3920ed987fcc9b158a17a62a953172.tar.gz
dexon-sol-tools-5c232b6a8d3920ed987fcc9b158a17a62a953172.tar.bz2
dexon-sol-tools-5c232b6a8d3920ed987fcc9b158a17a62a953172.tar.lz
dexon-sol-tools-5c232b6a8d3920ed987fcc9b158a17a62a953172.tar.xz
dexon-sol-tools-5c232b6a8d3920ed987fcc9b158a17a62a953172.tar.zst
dexon-sol-tools-5c232b6a8d3920ed987fcc9b158a17a62a953172.zip
Update CHANGELOGs
Diffstat (limited to 'packages/contract_templates')
-rw-r--r--packages/contract_templates/partials/callAsync.handlebars10
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/contract_templates/partials/callAsync.handlebars b/packages/contract_templates/partials/callAsync.handlebars
index 3cc16ccc6..58fb2f09c 100644
--- a/packages/contract_templates/partials/callAsync.handlebars
+++ b/packages/contract_templates/partials/callAsync.handlebars
@@ -18,12 +18,10 @@ async callAsync(
}
)
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- let result = ethersFunction.parse(rawCallResult);
-
+ let resultArray = ethersFunction.parse(rawCallResult);
const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs;
- result = BaseContract._formatABIDataItemList(outputAbi, result, BaseContract._lowercaseAddress.bind(this));
- result = BaseContract._formatABIDataItemList(outputAbi, result, BaseContract._bnToBigNumber.bind(this));
-
- return result{{#singleReturnValue}}[0]{{/singleReturnValue}};
+ resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
+ resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
+ return resultArray{{#singleReturnValue}}[0]{{/singleReturnValue}};
},
{{/hasReturnValue}}