Merge ifs
This commit is contained in:
parent
4f1e6296ca
commit
a0390956a9
@ -36,14 +36,12 @@ export const utils = {
|
|||||||
tsType: 'number|BigNumber',
|
tsType: 'number|BigNumber',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (backend === ContractsBackend.Ethers) {
|
if (backend === ContractsBackend.Ethers && paramKind === ParamKind.Output) {
|
||||||
if (paramKind === ParamKind.Output) {
|
// ethers-contracts automatically converts small BigNumbers to numbers
|
||||||
// ethers-contracts automatically converts small BigNumbers to numbers
|
solTypeRegexToTsType.unshift({
|
||||||
solTypeRegexToTsType.unshift({
|
regex: '^u?int(8|16|32|48)?$',
|
||||||
regex: '^u?int(8|16|32|48)?$',
|
tsType: 'number',
|
||||||
tsType: 'number',
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (const regexAndTxType of solTypeRegexToTsType) {
|
for (const regexAndTxType of solTypeRegexToTsType) {
|
||||||
const { regex, tsType } = regexAndTxType;
|
const { regex, tsType } = regexAndTxType;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user