aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/abi_utils.ts
diff options
context:
space:
mode:
authorFabio B <kandinsky454@protonmail.ch>2018-12-11 02:29:17 +0800
committerGitHub <noreply@github.com>2018-12-11 02:29:17 +0800
commit6c86cc8ab87ae6f8d435546ec80161faee7bce74 (patch)
treedcdf1233e5f86070b24b751c1b7792072360371d /packages/utils/src/abi_utils.ts
parent8d93413a5d49bcafe4b5d0dee359cc09afce7222 (diff)
parentf14603ca4d91ca72d9e81de53168230d85bc50aa (diff)
downloaddexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.gz
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.bz2
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.lz
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.xz
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.zst
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.zip
Merge pull request #1405 from 0xProject/tslint-changes
Implement prefer-template tslint rule
Diffstat (limited to 'packages/utils/src/abi_utils.ts')
-rw-r--r--packages/utils/src/abi_utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/utils/src/abi_utils.ts b/packages/utils/src/abi_utils.ts
index 598ea5fcc..3e6fc9665 100644
--- a/packages/utils/src/abi_utils.ts
+++ b/packages/utils/src/abi_utils.ts
@@ -26,7 +26,7 @@ function parseEthersParams(params: DataItem[]): { names: ParamName[]; types: str
const result = parseEthersParams(param.components);
names.push({ name: param.name || null, names: result.names });
- types.push('tuple(' + result.types.join(',') + ')' + suffix);
+ types.push(`tuple(${result.types.join(',')})${suffix}`);
} else {
names.push(param.name || null);
types.push(param.type);
@@ -120,7 +120,7 @@ function splitTupleTypes(type: string): string[] {
if (_.endsWith(type, '[]')) {
throw new Error('Internal error: array types are not supported');
} else if (!_.startsWith(type, 'tuple(')) {
- throw new Error('Internal error: expected tuple type but got non-tuple type: ' + type);
+ throw new Error(`Internal error: expected tuple type but got non-tuple type: ${type}`);
}
// Trim the outtermost tuple().
const trimmedType = type.substring('tuple('.length, type.length - 1);