@imtbl/sdk 0.28.9-alpha → 0.28.10

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/dist/orderbook.js CHANGED
@@ -861,12 +861,15 @@ function getOrderComponentsFromMessage(orderMessage) {
861
861
 
862
862
  // Add 20% more gas than estimate to prevent out of gas errors
863
863
  // This can always be overwritten by the user signing the transaction
864
- function prepareTransaction(transactionMethods) {
864
+ function prepareTransaction(transactionMethods,
865
+ // chainId is required for EIP155
866
+ chainId) {
865
867
  return async () => {
866
868
  const transaction = await transactionMethods.buildTransaction();
867
869
  transaction.gasLimit = await transactionMethods.estimateGas();
868
870
  transaction.gasLimit = transaction.gasLimit
869
871
  .add(transaction.gasLimit.div(5));
872
+ transaction.chainId = chainId;
870
873
  return transaction;
871
874
  };
872
875
  }
@@ -960,7 +963,7 @@ class Seaport {
960
963
  listingActions.push({
961
964
  type: ActionType.TRANSACTION,
962
965
  purpose: TransactionPurpose.APPROVAL,
963
- buildTransaction: prepareTransaction(approvalAction.transactionMethods),
966
+ buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
964
967
  });
965
968
  }
966
969
  const createAction = seaportActions.find((action) => action.type === 'create');
@@ -1001,7 +1004,7 @@ class Seaport {
1001
1004
  if (approvalAction) {
1002
1005
  fulfillmentActions.push({
1003
1006
  type: ActionType.TRANSACTION,
1004
- buildTransaction: prepareTransaction(approvalAction.transactionMethods),
1007
+ buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
1005
1008
  purpose: TransactionPurpose.APPROVAL,
1006
1009
  });
1007
1010
  }
@@ -1011,7 +1014,7 @@ class Seaport {
1011
1014
  }
1012
1015
  fulfillmentActions.push({
1013
1016
  type: ActionType.TRANSACTION,
1014
- buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods),
1017
+ buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
1015
1018
  purpose: TransactionPurpose.FULFILL_ORDER,
1016
1019
  });
1017
1020
  return {
@@ -1041,7 +1044,7 @@ class Seaport {
1041
1044
  if (approvalAction) {
1042
1045
  fulfillmentActions.push({
1043
1046
  type: ActionType.TRANSACTION,
1044
- buildTransaction: prepareTransaction(approvalAction.transactionMethods),
1047
+ buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
1045
1048
  purpose: TransactionPurpose.APPROVAL,
1046
1049
  });
1047
1050
  }
@@ -1051,7 +1054,7 @@ class Seaport {
1051
1054
  }
1052
1055
  fulfillmentActions.push({
1053
1056
  type: ActionType.TRANSACTION,
1054
- buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods),
1057
+ buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
1055
1058
  purpose: TransactionPurpose.FULFILL_ORDER,
1056
1059
  });
1057
1060
  return {
@@ -1068,7 +1071,7 @@ class Seaport {
1068
1071
  const cancellationTransaction = await seaportLib.cancelOrders(orderComponents, account);
1069
1072
  return {
1070
1073
  type: ActionType.TRANSACTION,
1071
- buildTransaction: prepareTransaction(cancellationTransaction),
1074
+ buildTransaction: prepareTransaction(cancellationTransaction, (await this.provider.getNetwork()).chainId),
1072
1075
  purpose: TransactionPurpose.CANCEL,
1073
1076
  };
1074
1077
  }
package/dist/passport.js CHANGED
@@ -2072,7 +2072,7 @@ class MultiRollupApiClients {
2072
2072
  }
2073
2073
 
2074
2074
  // eslint-disable-next-line @typescript-eslint/naming-convention
2075
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.28.9-alpha' };
2075
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.28.10' };
2076
2076
  const createConfig = ({ basePath, headers, }) => {
2077
2077
  if (!basePath.trim()) {
2078
2078
  throw Error('basePath can not be empty');
@@ -2128,7 +2128,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2128
2128
  chainID,
2129
2129
  coreContractAddress,
2130
2130
  registrationContractAddress,
2131
- sdkVersion: 'ts-immutable-sdk-0.28.9-alpha',
2131
+ sdkVersion: 'ts-immutable-sdk-0.28.10',
2132
2132
  });
2133
2133
  /**
2134
2134
  * Sets `sdkVersion` at the time of build
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.28.9-alpha",
4
+ "version": "0.28.10",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
@@ -90,6 +90,14 @@
90
90
  "./provider": {
91
91
  "types": "./dist/provider.d.ts",
92
92
  "import": "./dist/provider.js"
93
+ },
94
+ "./checkout_sdk": {
95
+ "types": "./dist/checkout_sdk.d.ts",
96
+ "import": "./dist/checkout_sdk.js"
97
+ },
98
+ "./checkout_widgets": {
99
+ "types": "./dist/checkout_widgets.d.ts",
100
+ "import": "./dist/checkout_widgets.js"
93
101
  }
94
102
  },
95
103
  "files": [