aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/order-utils/test/abi_encoder_test.ts18
1 files changed, 16 insertions, 2 deletions
diff --git a/packages/order-utils/test/abi_encoder_test.ts b/packages/order-utils/test/abi_encoder_test.ts
index 6b32d59aa..4b8ed48cc 100644
--- a/packages/order-utils/test/abi_encoder_test.ts
+++ b/packages/order-utils/test/abi_encoder_test.ts
@@ -137,6 +137,10 @@ namespace AbiEncoder {
return this.hexValue;
}
+ public getDataItem(): DataItem {
+ return this.dataItem;
+ }
+
public abstract assignValue(value: any): void;
// abstract match(type: string): Bool;
@@ -373,15 +377,25 @@ namespace AbiEncoder {
class Pointer extends StaticDataType {
destDataType: DynamicDataType;
- static metaDataItem = { name: '[ptr]', type: '[ptr]' } as DataItem;
constructor(destDataType: DynamicDataType) {
- super(Pointer.metaDataItem);
+ const destDataItem = destDataType.getDataItem();
+ const dataItem = { name: `ptr<${destDataItem.name}>`, type: `ptr<${destDataItem.type}>` } as DataItem;
+ super(dataItem);
this.destDataType = destDataType;
}
+ /*
public assignValue(destDataType: DynamicDataType) {
this.destDataType = destDataType;
+ }*/
+
+ public assignValue(value: any) {
+ this.destDataType.assignValue(value);
+ }
+
+ public getHexValue(): string {
+ return this.destDataType.getHexValue();
}
}