@velora-dex/sdk 9.4.3-dev.1 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velora-dex/sdk",
3
- "version": "9.4.3-dev.1",
3
+ "version": "9.5.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/sdk.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -4,7 +4,7 @@ import type {
4
4
  TxSendOverrides,
5
5
  } from '../../types';
6
6
  import { constructGetDeltaContract } from './getDeltaContract';
7
- import { sanitizeDeltaOrderData } from './helpers/misc';
7
+ import { sanitizeDeltaOrderData, sanitizeTWAPOrderData } from './helpers/misc';
8
8
  import { SignableDeltaOrderData } from './helpers/buildDeltaOrderData';
9
9
  import { produceDeltaOrderHash } from './preSignDeltaOrder';
10
10
  import type { ExtractAbiMethodNames } from '../../helpers/misc';
@@ -457,7 +457,7 @@ export const constructDeltaTokenModule = <T>(
457
457
  }
458
458
 
459
459
  const orderWithSig = {
460
- order,
460
+ order: sanitizeDeltaOrderData(order),
461
461
  signature,
462
462
  // bridgeOverride and cosignature are not used by the contract,
463
463
  // can always provide defaults
@@ -558,7 +558,7 @@ export const constructDeltaTokenModule = <T>(
558
558
  address: ParaswapDelta,
559
559
  abi: DeltaTokenModuleAbi,
560
560
  contractMethod: 'cancelTWAPAndWithdraw',
561
- args: [order],
561
+ args: [sanitizeTWAPOrderData(order)],
562
562
  overrides,
563
563
  });
564
564
 
@@ -577,7 +577,7 @@ export const constructDeltaTokenModule = <T>(
577
577
  address: ParaswapDelta,
578
578
  abi: DeltaTokenModuleAbi,
579
579
  contractMethod: 'cancelTWAPBuyAndWithdraw',
580
- args: [order],
580
+ args: [sanitizeTWAPOrderData(order)],
581
581
  overrides,
582
582
  });
583
583
 
@@ -14,7 +14,7 @@ import type { ExtractAbiMethodNames } from '../../helpers/misc';
14
14
  import { findPrimaryType } from '../../helpers/providers/helpers';
15
15
  import { constructGetDeltaContract } from './getDeltaContract';
16
16
  import type { TWAPDeltaOrder, TWAPBuyDeltaOrder } from './helpers/types';
17
- import { TypedDataField } from 'ethersV5';
17
+ import { TypedDataField } from '../common/orders/buildOrderData';
18
18
 
19
19
  type HashTWAPDeltaOrderTypedData = (
20
20
  signableOrderData: SignableTWAPOrderData