aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/test/abi/calldata.ts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-11-14 08:17:24 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-11-29 08:38:10 +0800
commit27cb966991c9408025106624f36927548b9e873c (patch)
tree71431e1f56572bcc160ed6397e58af5de489b036 /packages/order-utils/test/abi/calldata.ts
parent457cb1dc843511d6e987b0ffce0f985d4e97c968 (diff)
downloaddexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar
dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.gz
dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.bz2
dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.lz
dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.xz
dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.zst
dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.zip
Alias now points to dependency, not pointer
Diffstat (limited to 'packages/order-utils/test/abi/calldata.ts')
-rw-r--r--packages/order-utils/test/abi/calldata.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/order-utils/test/abi/calldata.ts b/packages/order-utils/test/abi/calldata.ts
index ab42b7d73..04bea9628 100644
--- a/packages/order-utils/test/abi/calldata.ts
+++ b/packages/order-utils/test/abi/calldata.ts
@@ -403,7 +403,7 @@ export class Calldata {
// Optimize
const lastSubtree = subtrees[subtrees.length - 1];
for (let i = 0; i < subtrees.length - 1; ++i) {
- subtrees[i].setAlias(lastSubtree);
+ subtrees[i].setAlias(lastSubtree.getDependency());
}
});
}
@@ -413,6 +413,8 @@ export class Calldata {
throw new Error('expected root');
}
+ if (optimize) this.optimize();
+
const offsetQueue = this.createQueue(this.root);
let block: CalldataBlock | undefined;
let offset = 0;
@@ -421,8 +423,6 @@ export class Calldata {
offset += block.getSizeInBytes();
}
- if (optimize) this.optimize();
-
const hexValue = annotate ? this.generateAnnotatedHexString() : this.generateCondensedHexString();
return hexValue;
}