aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils
diff options
context:
space:
mode:
Diffstat (limited to 'packages/order-utils')
-rw-r--r--packages/order-utils/test/abi/data_type.ts5
-rw-r--r--packages/order-utils/test/abi/evm_data_types.ts1
2 files changed, 4 insertions, 2 deletions
diff --git a/packages/order-utils/test/abi/data_type.ts b/packages/order-utils/test/abi/data_type.ts
index c1e352508..be7ae6154 100644
--- a/packages/order-utils/test/abi/data_type.ts
+++ b/packages/order-utils/test/abi/data_type.ts
@@ -32,6 +32,7 @@ export abstract class PayloadDataType extends DataType {
}
public generateCalldataBlock(value: any, parentBlock?: CalldataBlock): PayloadCalldataBlock {
+ //console.log();
const encodedValue = this.encodeValue(value);
const name = this.getDataItem().name;
const signature = this.getSignature();
@@ -173,8 +174,8 @@ export abstract class MemberDataType extends DataType {
const methodBlock: MemberCalldataBlock = new MemberCalldataBlock(this.getDataItem().name, this.getSignature(), false);
const memberBlocks: CalldataBlock[] = [];
- _.each(members, (member: DataType) => {
- const block = member.generateCalldataBlock(value, methodBlock);
+ _.each(members, (member: DataType, idx: number) => {
+ const block = member.generateCalldataBlock(value[idx], methodBlock);
memberBlocks.push(block);
});
methodBlock.setMembers(memberBlocks);
diff --git a/packages/order-utils/test/abi/evm_data_types.ts b/packages/order-utils/test/abi/evm_data_types.ts
index 1bd4f0d51..fcced646a 100644
--- a/packages/order-utils/test/abi/evm_data_types.ts
+++ b/packages/order-utils/test/abi/evm_data_types.ts
@@ -86,6 +86,7 @@ abstract class Number extends PayloadDataType {
}
public encodeValue(value: BigNumber): Buffer {
+ console.log(value);
if (value.greaterThan(this.getMaxValue())) {
throw `tried to assign value of ${value}, which exceeds max value of ${this.getMaxValue()}`;
} else if (value.lessThan(this.getMinValue())) {