@1inch/fusion-sdk 0.0.13 → 0.0.14

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.
@@ -2,7 +2,7 @@ import { PresetEnum } from '../types';
2
2
  import { FusionOrderParamsData } from './types';
3
3
  export declare class FusionOrderParams {
4
4
  readonly preset: PresetEnum;
5
- readonly receiver: string | undefined;
5
+ readonly receiver: string;
6
6
  readonly permit: string | undefined;
7
7
  readonly nonce: number | string | undefined;
8
8
  constructor(params: FusionOrderParamsData);
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FusionOrderParams = void 0;
4
4
  const types_1 = require("../types");
5
+ const constants_1 = require("../../../constants");
5
6
  class FusionOrderParams {
6
7
  constructor(params) {
7
8
  this.preset = types_1.PresetEnum.fast;
9
+ this.receiver = constants_1.ZERO_ADDRESS;
8
10
  if (params.preset) {
9
11
  this.preset = params.preset;
10
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"order-params.js","sourceRoot":"","sources":["../../../../src/api/quoter/quote/order-params.ts"],"names":[],"mappings":";;;AAAA,oCAAmC;AAGnC,MAAa,iBAAiB;IAS1B,YAAY,MAA6B;QARzB,WAAM,GAAe,kBAAU,CAAC,IAAI,CAAA;QAShD,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;SAC9B;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAA;SAClC;QAED,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAA;QAEzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;IAC/B,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,MAA8B;QACrC,OAAO,IAAI,iBAAiB,CAAC,MAAM,IAAI,EAAE,CAAC,CAAA;IAC9C,CAAC;CACJ;AA1BD,8CA0BC"}
1
+ {"version":3,"file":"order-params.js","sourceRoot":"","sources":["../../../../src/api/quoter/quote/order-params.ts"],"names":[],"mappings":";;;AAAA,oCAAmC;AAEnC,kDAA+C;AAE/C,MAAa,iBAAiB;IAS1B,YAAY,MAA6B;QARzB,WAAM,GAAe,kBAAU,CAAC,IAAI,CAAA;QAEpC,aAAQ,GAAW,wBAAY,CAAA;QAO3C,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;SAC9B;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAA;SAClC;QAED,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAA;QAEzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;IAC/B,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,MAA8B;QACrC,OAAO,IAAI,iBAAiB,CAAC,MAAM,IAAI,EAAE,CAAC,CAAA;IAC9C,CAAC;CACJ;AA1BD,8CA0BC"}
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InteractionsFactory = void 0;
4
+ const constants_1 = require("../constants");
4
5
  class InteractionsFactory {
5
6
  static unwrap(wethUnwrapper, receiverAddress) {
7
+ // in case maker == receiver address, we don't need to add the address
8
+ if (receiverAddress === constants_1.ZERO_ADDRESS) {
9
+ return wethUnwrapper;
10
+ }
6
11
  return wethUnwrapper + receiverAddress.substring(2);
7
12
  }
8
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interactions-factory.js","sourceRoot":"","sources":["../../src/limit-order/interactions-factory.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAmB;IAC5B,MAAM,CAAC,MAAM,CAAC,aAAqB,EAAE,eAAuB;QACxD,OAAO,aAAa,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;IACvD,CAAC;CACJ;AAJD,kDAIC"}
1
+ {"version":3,"file":"interactions-factory.js","sourceRoot":"","sources":["../../src/limit-order/interactions-factory.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AAEzC,MAAa,mBAAmB;IAC5B,MAAM,CAAC,MAAM,CAAC,aAAqB,EAAE,eAAuB;QACxD,sEAAsE;QACtE,IAAI,eAAe,KAAK,wBAAY,EAAE;YAClC,OAAO,aAAa,CAAA;SACvB;QAED,OAAO,aAAa,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;IACvD,CAAC;CACJ;AATD,kDASC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1inch/fusion-sdk",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "1inch Fusion Mode SDK",
5
5
  "private": false,
6
6
  "main": "index.js",