Skip to content
This repository was archived by the owner on Jul 30, 2022. It is now read-only.

Commit 0c012ff

Browse files
committed
Merge branch 'alexcampbelling-fix/nested-tuple-array'
2 parents 3b89e05 + 1613760 commit 0c012ff

10 files changed

+17850
-10834
lines changed

dist/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ var InputDataDecoder = function () {
193193

194194
function deepStripTupleAddresses(input, tupleTypes) {
195195
return input.map(function (item, i) {
196-
var type = tupleTypes[i].type;
196+
// We find tupleTypes to not be an array where internalType is present in the ABI indicating item is a structure
197+
var type = tupleTypes[i] ? tupleTypes[i].type : null;
198+
197199
if (type === 'address' && typeof item === 'string') {
198200
return item.split('0x')[1];
199201
}
@@ -202,6 +204,11 @@ function deepStripTupleAddresses(input, tupleTypes) {
202204
return a.split('0x')[1];
203205
});
204206
}
207+
208+
if (Array.isArray(item)) {
209+
return deepStripTupleAddresses(item, tupleTypes);
210+
}
211+
205212
return item;
206213
});
207214
}

0 commit comments

Comments
 (0)