aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-02-28 02:43:42 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-02-28 04:07:06 +0800
commita0390956a91b2e15052d1b5ca43ef6d85d64234e (patch)
tree2bf4973084bdb8336b2c0307d3d5dc2d4095a949
parent4f1e6296ca221c801d476345c491a0372f0af5b3 (diff)
downloaddexon-sol-tools-a0390956a91b2e15052d1b5ca43ef6d85d64234e.tar
dexon-sol-tools-a0390956a91b2e15052d1b5ca43ef6d85d64234e.tar.gz
dexon-sol-tools-a0390956a91b2e15052d1b5ca43ef6d85d64234e.tar.bz2
dexon-sol-tools-a0390956a91b2e15052d1b5ca43ef6d85d64234e.tar.lz
dexon-sol-tools-a0390956a91b2e15052d1b5ca43ef6d85d64234e.tar.xz
dexon-sol-tools-a0390956a91b2e15052d1b5ca43ef6d85d64234e.tar.zst
dexon-sol-tools-a0390956a91b2e15052d1b5ca43ef6d85d64234e.zip
Merge ifs
-rw-r--r--packages/abi-gen/src/utils.ts14
1 files changed, 6 insertions, 8 deletions
diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts
index 349604aec..3e4ff619a 100644
--- a/packages/abi-gen/src/utils.ts
+++ b/packages/abi-gen/src/utils.ts
@@ -36,14 +36,12 @@ export const utils = {
tsType: 'number|BigNumber',
});
}
- if (backend === ContractsBackend.Ethers) {
- if (paramKind === ParamKind.Output) {
- // ethers-contracts automatically converts small BigNumbers to numbers
- solTypeRegexToTsType.unshift({
- regex: '^u?int(8|16|32|48)?$',
- tsType: 'number',
- });
- }
+ if (backend === ContractsBackend.Ethers && paramKind === ParamKind.Output) {
+ // ethers-contracts automatically converts small BigNumbers to numbers
+ solTypeRegexToTsType.unshift({
+ regex: '^u?int(8|16|32|48)?$',
+ tsType: 'number',
+ });
}
for (const regexAndTxType of solTypeRegexToTsType) {
const { regex, tsType } = regexAndTxType;