aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/partials/callAsync.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contract_templates/partials/callAsync.handlebars')
-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}}