diff --git a/src/fusion-order/fusion-order.spec.ts b/src/fusion-order/fusion-order.spec.ts index 952bbde..c410381 100644 --- a/src/fusion-order/fusion-order.spec.ts +++ b/src/fusion-order/fusion-order.spec.ts @@ -57,7 +57,7 @@ describe('Fusion Order', () => { takerAsset: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', takingAmount: '1420000000', makerTraits: - '29852648006495581632639394572552351243421169944806257724550573036760110989312', + '33471150795161712739625987854073848363835856965607525350783622537007396290560', salt: '14969955465678758833706505435513058355190519874774' }) diff --git a/src/fusion-order/fusion-order.ts b/src/fusion-order/fusion-order.ts index 76cd23b..ea9ab31 100644 --- a/src/fusion-order/fusion-order.ts +++ b/src/fusion-order/fusion-order.ts @@ -93,6 +93,7 @@ export class FusionOrder { .withExpiration(deadline) .setPartialFills(allowPartialFills) .setMultipleFills(allowMultipleFills) + .enablePostInteraction() if (makerTraits.isBitInvalidatorMode()) { assert( diff --git a/src/fusion-order/settlement-post-interaction-data/settlement-post-interaction-data.spec.ts b/src/fusion-order/settlement-post-interaction-data/settlement-post-interaction-data.spec.ts index 2fa10e4..5d22405 100644 --- a/src/fusion-order/settlement-post-interaction-data/settlement-post-interaction-data.spec.ts +++ b/src/fusion-order/settlement-post-interaction-data/settlement-post-interaction-data.spec.ts @@ -4,7 +4,7 @@ import {SettlementPostInteractionData} from './settlement-post-interaction-data' import {bpsToRatioFormat} from '../../sdk/utils' describe('SettlementPostInteractionData', () => { - it('Should encode/decode with no fees and whitelist', () => { + it('Should encode/decode with bank fee and whitelist', () => { const data = SettlementPostInteractionData.new({ bankFee: 1n, resolvingStartTime: 1708117482n, @@ -24,6 +24,24 @@ describe('SettlementPostInteractionData', () => { ) }) + it('Should encode/decode with no fees and whitelist', () => { + const data = SettlementPostInteractionData.new({ + resolvingStartTime: 1708117482n, + whitelist: [ + { + address: Address.ZERO_ADDRESS, + allowFrom: 0n + } + ] + }) + + const encoded = data.encode() + + expect(getBytesCount(encoded)).toEqual(17n) + expect(SettlementPostInteractionData.decode(encoded)).toStrictEqual( + data + ) + }) it('Should encode/decode with fees and whitelist', () => { const data = SettlementPostInteractionData.new({ bankFee: 0n,