@imtbl/sdk 1.23.2 → 1.24.0-alpha
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/blockchain_data.js +2 -2
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/checkout.js +54 -16
- package/dist/config.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +57 -19
- package/dist/index.js +57 -19
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +4 -4
- package/dist/x.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -180,7 +180,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
180
180
|
};
|
|
181
181
|
|
|
182
182
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
183
|
-
const SDK_VERSION$1 = '1.
|
|
183
|
+
const SDK_VERSION$1 = '1.24.0-alpha';
|
|
184
184
|
const getReferrer$1 = () => {
|
|
185
185
|
if (isNode$1()) {
|
|
186
186
|
return '';
|
|
@@ -13731,7 +13731,7 @@ class MultiRollupApiClients {
|
|
|
13731
13731
|
}
|
|
13732
13732
|
|
|
13733
13733
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13734
|
-
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.
|
|
13734
|
+
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha' };
|
|
13735
13735
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
13736
13736
|
if (!basePath.trim()) {
|
|
13737
13737
|
throw Error('basePath can not be empty');
|
|
@@ -13803,7 +13803,7 @@ class APIError extends Error {
|
|
|
13803
13803
|
|
|
13804
13804
|
/* eslint-disable implicit-arrow-linebreak */
|
|
13805
13805
|
const defaultHeaders$1 = {
|
|
13806
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.
|
|
13806
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.24.0-alpha',
|
|
13807
13807
|
};
|
|
13808
13808
|
/**
|
|
13809
13809
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -14277,7 +14277,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
|
|
|
14277
14277
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
14278
14278
|
class ApiConfiguration extends index$2.Configuration {
|
|
14279
14279
|
}
|
|
14280
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.
|
|
14280
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha' };
|
|
14281
14281
|
/**
|
|
14282
14282
|
* @dev use createImmutableXConfiguration instead
|
|
14283
14283
|
*/
|
|
@@ -14316,7 +14316,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
14316
14316
|
chainID,
|
|
14317
14317
|
coreContractAddress,
|
|
14318
14318
|
registrationContractAddress,
|
|
14319
|
-
sdkVersion: 'ts-immutable-sdk-1.
|
|
14319
|
+
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha',
|
|
14320
14320
|
baseConfig,
|
|
14321
14321
|
});
|
|
14322
14322
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -45632,7 +45632,7 @@ const flattenProperties = (properties) => {
|
|
|
45632
45632
|
};
|
|
45633
45633
|
|
|
45634
45634
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
45635
|
-
const SDK_VERSION = '1.
|
|
45635
|
+
const SDK_VERSION = '1.24.0-alpha';
|
|
45636
45636
|
const getReferrer = () => {
|
|
45637
45637
|
if (isNode()) {
|
|
45638
45638
|
return '';
|
|
@@ -50827,7 +50827,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
50827
50827
|
maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
|
|
50828
50828
|
};
|
|
50829
50829
|
|
|
50830
|
-
const SDK_VERSION_MARKER = '1.
|
|
50830
|
+
const SDK_VERSION_MARKER = '1.24.0-alpha';
|
|
50831
50831
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
50832
50832
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
50833
50833
|
|
|
@@ -52096,8 +52096,7 @@ const erc721BalanceAggregator = (itemRequirements) => {
|
|
|
52096
52096
|
const balanceAggregator = (itemRequirements) => erc721BalanceAggregator(erc20BalanceAggregator(nativeBalanceAggregator(itemRequirements)));
|
|
52097
52097
|
|
|
52098
52098
|
/* eslint-disable arrow-body-style */
|
|
52099
|
-
const getTokensFromRequirements = (itemRequirements) => itemRequirements
|
|
52100
|
-
.map((itemRequirement) => {
|
|
52099
|
+
const getTokensFromRequirements = (itemRequirements) => itemRequirements.map((itemRequirement) => {
|
|
52101
52100
|
switch (itemRequirement.type) {
|
|
52102
52101
|
case ItemType.ERC20:
|
|
52103
52102
|
return {
|
|
@@ -52122,11 +52121,11 @@ const getERC721BalanceRequirement = (itemRequirement, balances) => {
|
|
|
52122
52121
|
// Find the requirements related balance
|
|
52123
52122
|
const itemBalanceResult = balances.find((balance) => {
|
|
52124
52123
|
const balanceERC721Result = balance;
|
|
52125
|
-
return isMatchingAddress(balanceERC721Result.contractAddress, itemRequirement.contractAddress)
|
|
52126
|
-
&& balanceERC721Result.id === itemRequirement.id;
|
|
52124
|
+
return (isMatchingAddress(balanceERC721Result.contractAddress, itemRequirement.contractAddress) && balanceERC721Result.id === itemRequirement.id);
|
|
52127
52125
|
});
|
|
52128
52126
|
// Calculate the balance delta
|
|
52129
|
-
const sufficient =
|
|
52127
|
+
const sufficient = requiredBalance.isNegative()
|
|
52128
|
+
|| requiredBalance.isZero()
|
|
52130
52129
|
|| (itemBalanceResult?.balance.gte(requiredBalance) ?? false);
|
|
52131
52130
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? ethers.BigNumber.from(0));
|
|
52132
52131
|
let erc721BalanceResult = itemBalanceResult;
|
|
@@ -52157,7 +52156,7 @@ const getERC721BalanceRequirement = (itemRequirement, balances) => {
|
|
|
52157
52156
|
/**
|
|
52158
52157
|
* Gets the balance requirement for a NATIVE or ERC20 requirement.
|
|
52159
52158
|
*/
|
|
52160
|
-
const getTokenBalanceRequirement = (itemRequirement, balances) => {
|
|
52159
|
+
const getTokenBalanceRequirement = async (itemRequirement, balances, provider) => {
|
|
52161
52160
|
let itemBalanceResult;
|
|
52162
52161
|
// Get the requirements related balance
|
|
52163
52162
|
if (itemRequirement.type === ItemType.ERC20) {
|
|
@@ -52172,17 +52171,37 @@ const getTokenBalanceRequirement = (itemRequirement, balances) => {
|
|
|
52172
52171
|
}
|
|
52173
52172
|
// Calculate the balance delta
|
|
52174
52173
|
const requiredBalance = itemRequirement.amount;
|
|
52175
|
-
const sufficient =
|
|
52174
|
+
const sufficient = requiredBalance.isNegative()
|
|
52175
|
+
|| requiredBalance.isZero()
|
|
52176
52176
|
|| (itemBalanceResult?.balance.gte(requiredBalance) ?? false);
|
|
52177
52177
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? ethers.BigNumber.from(0));
|
|
52178
52178
|
let name = '';
|
|
52179
52179
|
let symbol = '';
|
|
52180
52180
|
let decimals = DEFAULT_TOKEN_DECIMALS$1;
|
|
52181
52181
|
if (itemBalanceResult) {
|
|
52182
|
-
decimals = itemBalanceResult.token?.decimals
|
|
52182
|
+
decimals = itemBalanceResult.token?.decimals
|
|
52183
|
+
?? DEFAULT_TOKEN_DECIMALS$1;
|
|
52183
52184
|
name = itemBalanceResult.token.name;
|
|
52184
52185
|
symbol = itemBalanceResult.token.symbol;
|
|
52185
52186
|
}
|
|
52187
|
+
else if (itemRequirement.type === ItemType.ERC20) {
|
|
52188
|
+
// Missing item balance so we need to query contract
|
|
52189
|
+
try {
|
|
52190
|
+
const contract = new ethers.Contract(itemRequirement.tokenAddress, JSON.stringify(ERC20ABI), provider);
|
|
52191
|
+
const [contractName, contractSymbol, contractDecimals] = await Promise.all([
|
|
52192
|
+
contract.name(),
|
|
52193
|
+
contract.symbol(),
|
|
52194
|
+
contract.decimals(),
|
|
52195
|
+
]);
|
|
52196
|
+
decimals = contractDecimals;
|
|
52197
|
+
name = contractName;
|
|
52198
|
+
symbol = contractSymbol;
|
|
52199
|
+
}
|
|
52200
|
+
catch (error) {
|
|
52201
|
+
// eslint-disable-next-line no-console
|
|
52202
|
+
console.error('Failed to query contract information', itemRequirement.tokenAddress);
|
|
52203
|
+
}
|
|
52204
|
+
}
|
|
52186
52205
|
let tokenBalanceResult = itemBalanceResult;
|
|
52187
52206
|
if (itemRequirement.type === ItemType.NATIVE) {
|
|
52188
52207
|
// No token balance so mark as zero native
|
|
@@ -52234,9 +52253,23 @@ const getTokenBalanceRequirement = (itemRequirement, balances) => {
|
|
|
52234
52253
|
balance: delta,
|
|
52235
52254
|
formattedBalance: ethers.utils.formatUnits(delta, decimals),
|
|
52236
52255
|
},
|
|
52237
|
-
current:
|
|
52256
|
+
current: {
|
|
52257
|
+
...tokenBalanceResult,
|
|
52258
|
+
token: {
|
|
52259
|
+
address: itemRequirement.tokenAddress,
|
|
52260
|
+
name,
|
|
52261
|
+
symbol,
|
|
52262
|
+
decimals,
|
|
52263
|
+
},
|
|
52264
|
+
},
|
|
52238
52265
|
required: {
|
|
52239
52266
|
...tokenBalanceResult,
|
|
52267
|
+
token: {
|
|
52268
|
+
address: itemRequirement.tokenAddress,
|
|
52269
|
+
name,
|
|
52270
|
+
symbol,
|
|
52271
|
+
decimals,
|
|
52272
|
+
},
|
|
52240
52273
|
balance: ethers.BigNumber.from(itemRequirement.amount),
|
|
52241
52274
|
formattedBalance: ethers.utils.formatUnits(itemRequirement.amount, decimals),
|
|
52242
52275
|
},
|
|
@@ -52333,13 +52366,14 @@ const balanceCheck = async (config, provider, ownerAddress, itemRequirements, fo
|
|
|
52333
52366
|
}
|
|
52334
52367
|
// Wait for all balances and calculate the requirements
|
|
52335
52368
|
const promisesResponses = await Promise.all(balancePromises);
|
|
52336
|
-
const
|
|
52369
|
+
const erc721BalanceRequirements = [];
|
|
52370
|
+
const tokenBalanceRequirementPromises = [];
|
|
52337
52371
|
// Get all ERC20 and NATIVE balances
|
|
52338
52372
|
if (requiredToken.length > 0 && promisesResponses.length > 0) {
|
|
52339
52373
|
const result = promisesResponses.shift();
|
|
52340
52374
|
if (result) {
|
|
52341
52375
|
requiredToken.forEach((item) => {
|
|
52342
|
-
|
|
52376
|
+
tokenBalanceRequirementPromises.push(getTokenBalanceRequirement(item, result, provider));
|
|
52343
52377
|
});
|
|
52344
52378
|
}
|
|
52345
52379
|
}
|
|
@@ -52348,10 +52382,14 @@ const balanceCheck = async (config, provider, ownerAddress, itemRequirements, fo
|
|
|
52348
52382
|
const result = promisesResponses.shift();
|
|
52349
52383
|
if (result) {
|
|
52350
52384
|
requiredERC721.forEach((item) => {
|
|
52351
|
-
|
|
52385
|
+
erc721BalanceRequirements.push(getERC721BalanceRequirement(item, result));
|
|
52352
52386
|
});
|
|
52353
52387
|
}
|
|
52354
52388
|
}
|
|
52389
|
+
const balanceRequirements = [
|
|
52390
|
+
...erc721BalanceRequirements,
|
|
52391
|
+
...(await Promise.all(tokenBalanceRequirementPromises)),
|
|
52392
|
+
];
|
|
52355
52393
|
// Find if there are any requirements that aren't sufficient.
|
|
52356
52394
|
// If there is not item with sufficient === false then the requirements
|
|
52357
52395
|
// are satisfied.
|
package/dist/index.js
CHANGED
|
@@ -158,7 +158,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
161
|
-
const SDK_VERSION$1 = '1.
|
|
161
|
+
const SDK_VERSION$1 = '1.24.0-alpha';
|
|
162
162
|
const getReferrer$1 = () => {
|
|
163
163
|
if (isNode$1()) {
|
|
164
164
|
return '';
|
|
@@ -13709,7 +13709,7 @@ class MultiRollupApiClients {
|
|
|
13709
13709
|
}
|
|
13710
13710
|
|
|
13711
13711
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13712
|
-
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.
|
|
13712
|
+
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha' };
|
|
13713
13713
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
13714
13714
|
if (!basePath.trim()) {
|
|
13715
13715
|
throw Error('basePath can not be empty');
|
|
@@ -13781,7 +13781,7 @@ class APIError extends Error {
|
|
|
13781
13781
|
|
|
13782
13782
|
/* eslint-disable implicit-arrow-linebreak */
|
|
13783
13783
|
const defaultHeaders$1 = {
|
|
13784
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.
|
|
13784
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.24.0-alpha',
|
|
13785
13785
|
};
|
|
13786
13786
|
/**
|
|
13787
13787
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -14255,7 +14255,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
|
|
|
14255
14255
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
14256
14256
|
class ApiConfiguration extends index$2.Configuration {
|
|
14257
14257
|
}
|
|
14258
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.
|
|
14258
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha' };
|
|
14259
14259
|
/**
|
|
14260
14260
|
* @dev use createImmutableXConfiguration instead
|
|
14261
14261
|
*/
|
|
@@ -14294,7 +14294,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
14294
14294
|
chainID,
|
|
14295
14295
|
coreContractAddress,
|
|
14296
14296
|
registrationContractAddress,
|
|
14297
|
-
sdkVersion: 'ts-immutable-sdk-1.
|
|
14297
|
+
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha',
|
|
14298
14298
|
baseConfig,
|
|
14299
14299
|
});
|
|
14300
14300
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -45610,7 +45610,7 @@ const flattenProperties = (properties) => {
|
|
|
45610
45610
|
};
|
|
45611
45611
|
|
|
45612
45612
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
45613
|
-
const SDK_VERSION = '1.
|
|
45613
|
+
const SDK_VERSION = '1.24.0-alpha';
|
|
45614
45614
|
const getReferrer = () => {
|
|
45615
45615
|
if (isNode()) {
|
|
45616
45616
|
return '';
|
|
@@ -50805,7 +50805,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
50805
50805
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
50806
50806
|
};
|
|
50807
50807
|
|
|
50808
|
-
const SDK_VERSION_MARKER = '1.
|
|
50808
|
+
const SDK_VERSION_MARKER = '1.24.0-alpha';
|
|
50809
50809
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
50810
50810
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
50811
50811
|
|
|
@@ -52074,8 +52074,7 @@ const erc721BalanceAggregator = (itemRequirements) => {
|
|
|
52074
52074
|
const balanceAggregator = (itemRequirements) => erc721BalanceAggregator(erc20BalanceAggregator(nativeBalanceAggregator(itemRequirements)));
|
|
52075
52075
|
|
|
52076
52076
|
/* eslint-disable arrow-body-style */
|
|
52077
|
-
const getTokensFromRequirements = (itemRequirements) => itemRequirements
|
|
52078
|
-
.map((itemRequirement) => {
|
|
52077
|
+
const getTokensFromRequirements = (itemRequirements) => itemRequirements.map((itemRequirement) => {
|
|
52079
52078
|
switch (itemRequirement.type) {
|
|
52080
52079
|
case ItemType.ERC20:
|
|
52081
52080
|
return {
|
|
@@ -52100,11 +52099,11 @@ const getERC721BalanceRequirement = (itemRequirement, balances) => {
|
|
|
52100
52099
|
// Find the requirements related balance
|
|
52101
52100
|
const itemBalanceResult = balances.find((balance) => {
|
|
52102
52101
|
const balanceERC721Result = balance;
|
|
52103
|
-
return isMatchingAddress(balanceERC721Result.contractAddress, itemRequirement.contractAddress)
|
|
52104
|
-
&& balanceERC721Result.id === itemRequirement.id;
|
|
52102
|
+
return (isMatchingAddress(balanceERC721Result.contractAddress, itemRequirement.contractAddress) && balanceERC721Result.id === itemRequirement.id);
|
|
52105
52103
|
});
|
|
52106
52104
|
// Calculate the balance delta
|
|
52107
|
-
const sufficient =
|
|
52105
|
+
const sufficient = requiredBalance.isNegative()
|
|
52106
|
+
|| requiredBalance.isZero()
|
|
52108
52107
|
|| (itemBalanceResult?.balance.gte(requiredBalance) ?? false);
|
|
52109
52108
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? BigNumber$1.from(0));
|
|
52110
52109
|
let erc721BalanceResult = itemBalanceResult;
|
|
@@ -52135,7 +52134,7 @@ const getERC721BalanceRequirement = (itemRequirement, balances) => {
|
|
|
52135
52134
|
/**
|
|
52136
52135
|
* Gets the balance requirement for a NATIVE or ERC20 requirement.
|
|
52137
52136
|
*/
|
|
52138
|
-
const getTokenBalanceRequirement = (itemRequirement, balances) => {
|
|
52137
|
+
const getTokenBalanceRequirement = async (itemRequirement, balances, provider) => {
|
|
52139
52138
|
let itemBalanceResult;
|
|
52140
52139
|
// Get the requirements related balance
|
|
52141
52140
|
if (itemRequirement.type === ItemType.ERC20) {
|
|
@@ -52150,17 +52149,37 @@ const getTokenBalanceRequirement = (itemRequirement, balances) => {
|
|
|
52150
52149
|
}
|
|
52151
52150
|
// Calculate the balance delta
|
|
52152
52151
|
const requiredBalance = itemRequirement.amount;
|
|
52153
|
-
const sufficient =
|
|
52152
|
+
const sufficient = requiredBalance.isNegative()
|
|
52153
|
+
|| requiredBalance.isZero()
|
|
52154
52154
|
|| (itemBalanceResult?.balance.gte(requiredBalance) ?? false);
|
|
52155
52155
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? BigNumber$1.from(0));
|
|
52156
52156
|
let name = '';
|
|
52157
52157
|
let symbol = '';
|
|
52158
52158
|
let decimals = DEFAULT_TOKEN_DECIMALS$1;
|
|
52159
52159
|
if (itemBalanceResult) {
|
|
52160
|
-
decimals = itemBalanceResult.token?.decimals
|
|
52160
|
+
decimals = itemBalanceResult.token?.decimals
|
|
52161
|
+
?? DEFAULT_TOKEN_DECIMALS$1;
|
|
52161
52162
|
name = itemBalanceResult.token.name;
|
|
52162
52163
|
symbol = itemBalanceResult.token.symbol;
|
|
52163
52164
|
}
|
|
52165
|
+
else if (itemRequirement.type === ItemType.ERC20) {
|
|
52166
|
+
// Missing item balance so we need to query contract
|
|
52167
|
+
try {
|
|
52168
|
+
const contract = new Contract$1(itemRequirement.tokenAddress, JSON.stringify(ERC20ABI), provider);
|
|
52169
|
+
const [contractName, contractSymbol, contractDecimals] = await Promise.all([
|
|
52170
|
+
contract.name(),
|
|
52171
|
+
contract.symbol(),
|
|
52172
|
+
contract.decimals(),
|
|
52173
|
+
]);
|
|
52174
|
+
decimals = contractDecimals;
|
|
52175
|
+
name = contractName;
|
|
52176
|
+
symbol = contractSymbol;
|
|
52177
|
+
}
|
|
52178
|
+
catch (error) {
|
|
52179
|
+
// eslint-disable-next-line no-console
|
|
52180
|
+
console.error('Failed to query contract information', itemRequirement.tokenAddress);
|
|
52181
|
+
}
|
|
52182
|
+
}
|
|
52164
52183
|
let tokenBalanceResult = itemBalanceResult;
|
|
52165
52184
|
if (itemRequirement.type === ItemType.NATIVE) {
|
|
52166
52185
|
// No token balance so mark as zero native
|
|
@@ -52212,9 +52231,23 @@ const getTokenBalanceRequirement = (itemRequirement, balances) => {
|
|
|
52212
52231
|
balance: delta,
|
|
52213
52232
|
formattedBalance: utils$3.formatUnits(delta, decimals),
|
|
52214
52233
|
},
|
|
52215
|
-
current:
|
|
52234
|
+
current: {
|
|
52235
|
+
...tokenBalanceResult,
|
|
52236
|
+
token: {
|
|
52237
|
+
address: itemRequirement.tokenAddress,
|
|
52238
|
+
name,
|
|
52239
|
+
symbol,
|
|
52240
|
+
decimals,
|
|
52241
|
+
},
|
|
52242
|
+
},
|
|
52216
52243
|
required: {
|
|
52217
52244
|
...tokenBalanceResult,
|
|
52245
|
+
token: {
|
|
52246
|
+
address: itemRequirement.tokenAddress,
|
|
52247
|
+
name,
|
|
52248
|
+
symbol,
|
|
52249
|
+
decimals,
|
|
52250
|
+
},
|
|
52218
52251
|
balance: BigNumber$1.from(itemRequirement.amount),
|
|
52219
52252
|
formattedBalance: utils$3.formatUnits(itemRequirement.amount, decimals),
|
|
52220
52253
|
},
|
|
@@ -52311,13 +52344,14 @@ const balanceCheck = async (config, provider, ownerAddress, itemRequirements, fo
|
|
|
52311
52344
|
}
|
|
52312
52345
|
// Wait for all balances and calculate the requirements
|
|
52313
52346
|
const promisesResponses = await Promise.all(balancePromises);
|
|
52314
|
-
const
|
|
52347
|
+
const erc721BalanceRequirements = [];
|
|
52348
|
+
const tokenBalanceRequirementPromises = [];
|
|
52315
52349
|
// Get all ERC20 and NATIVE balances
|
|
52316
52350
|
if (requiredToken.length > 0 && promisesResponses.length > 0) {
|
|
52317
52351
|
const result = promisesResponses.shift();
|
|
52318
52352
|
if (result) {
|
|
52319
52353
|
requiredToken.forEach((item) => {
|
|
52320
|
-
|
|
52354
|
+
tokenBalanceRequirementPromises.push(getTokenBalanceRequirement(item, result, provider));
|
|
52321
52355
|
});
|
|
52322
52356
|
}
|
|
52323
52357
|
}
|
|
@@ -52326,10 +52360,14 @@ const balanceCheck = async (config, provider, ownerAddress, itemRequirements, fo
|
|
|
52326
52360
|
const result = promisesResponses.shift();
|
|
52327
52361
|
if (result) {
|
|
52328
52362
|
requiredERC721.forEach((item) => {
|
|
52329
|
-
|
|
52363
|
+
erc721BalanceRequirements.push(getERC721BalanceRequirement(item, result));
|
|
52330
52364
|
});
|
|
52331
52365
|
}
|
|
52332
52366
|
}
|
|
52367
|
+
const balanceRequirements = [
|
|
52368
|
+
...erc721BalanceRequirements,
|
|
52369
|
+
...(await Promise.all(tokenBalanceRequirementPromises)),
|
|
52370
|
+
];
|
|
52333
52371
|
// Find if there are any requirements that aren't sufficient.
|
|
52334
52372
|
// If there is not item with sufficient === false then the requirements
|
|
52335
52373
|
// are satisfied.
|
package/dist/orderbook.js
CHANGED
|
@@ -131,7 +131,7 @@ const flattenProperties = (properties) => {
|
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
134
|
-
const SDK_VERSION = '1.
|
|
134
|
+
const SDK_VERSION = '1.24.0-alpha';
|
|
135
135
|
const getReferrer = () => {
|
|
136
136
|
if (isNode()) {
|
|
137
137
|
return '';
|
package/dist/passport.js
CHANGED
|
@@ -11446,7 +11446,7 @@ class MultiRollupApiClients {
|
|
|
11446
11446
|
}
|
|
11447
11447
|
|
|
11448
11448
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11449
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.
|
|
11449
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha' };
|
|
11450
11450
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
11451
11451
|
if (!basePath.trim()) {
|
|
11452
11452
|
throw Error('basePath can not be empty');
|
|
@@ -11625,7 +11625,7 @@ const flattenProperties = (properties) => {
|
|
|
11625
11625
|
};
|
|
11626
11626
|
|
|
11627
11627
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
11628
|
-
const SDK_VERSION = '1.
|
|
11628
|
+
const SDK_VERSION = '1.24.0-alpha';
|
|
11629
11629
|
const getReferrer = () => {
|
|
11630
11630
|
if (isNode()) {
|
|
11631
11631
|
return '';
|
|
@@ -11875,7 +11875,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
11875
11875
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
11876
11876
|
class ApiConfiguration extends index$2.Configuration {
|
|
11877
11877
|
}
|
|
11878
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.
|
|
11878
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha' };
|
|
11879
11879
|
/**
|
|
11880
11880
|
* @dev use createImmutableXConfiguration instead
|
|
11881
11881
|
*/
|
|
@@ -11914,7 +11914,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
11914
11914
|
chainID,
|
|
11915
11915
|
coreContractAddress,
|
|
11916
11916
|
registrationContractAddress,
|
|
11917
|
-
sdkVersion: 'ts-immutable-sdk-1.
|
|
11917
|
+
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha',
|
|
11918
11918
|
baseConfig,
|
|
11919
11919
|
});
|
|
11920
11920
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
package/dist/x.js
CHANGED
|
@@ -8954,7 +8954,7 @@ const flattenProperties = (properties) => {
|
|
|
8954
8954
|
};
|
|
8955
8955
|
|
|
8956
8956
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
8957
|
-
const SDK_VERSION = '1.
|
|
8957
|
+
const SDK_VERSION = '1.24.0-alpha';
|
|
8958
8958
|
const getReferrer = () => {
|
|
8959
8959
|
if (isNode()) {
|
|
8960
8960
|
return '';
|
|
@@ -9197,7 +9197,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
9197
9197
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
9198
9198
|
class ApiConfiguration extends index$2.Configuration {
|
|
9199
9199
|
}
|
|
9200
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.
|
|
9200
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha' };
|
|
9201
9201
|
/**
|
|
9202
9202
|
* @dev use createImmutableXConfiguration instead
|
|
9203
9203
|
*/
|
|
@@ -9236,7 +9236,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
9236
9236
|
chainID,
|
|
9237
9237
|
coreContractAddress,
|
|
9238
9238
|
registrationContractAddress,
|
|
9239
|
-
sdkVersion: 'ts-immutable-sdk-1.
|
|
9239
|
+
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha',
|
|
9240
9240
|
baseConfig,
|
|
9241
9241
|
});
|
|
9242
9242
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
package/package.json
CHANGED