@imtbl/sdk 0.27.15-alpha.4 → 0.27.15-alpha.5
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 +1 -1
- package/dist/browser/checkout/sdk.js +1 -1
- package/dist/browser/checkout/widgets.js +1 -1
- package/dist/checkout_sdk.js +15 -22
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +3 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +17 -24
- package/dist/index.js +17 -24
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/checkout_sdk.js
CHANGED
|
@@ -20599,7 +20599,7 @@ class APIError extends Error {
|
|
|
20599
20599
|
|
|
20600
20600
|
/* eslint-disable implicit-arrow-linebreak */
|
|
20601
20601
|
const defaultHeaders = {
|
|
20602
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.15-alpha.
|
|
20602
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.15-alpha.5',
|
|
20603
20603
|
};
|
|
20604
20604
|
/**
|
|
20605
20605
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -25266,7 +25266,7 @@ async function getItemRequirementsFromRequirements(provider, requirements) {
|
|
|
25266
25266
|
return itemRequirements;
|
|
25267
25267
|
}
|
|
25268
25268
|
|
|
25269
|
-
const SDK_VERSION_MARKER = '0.27.15-alpha.
|
|
25269
|
+
const SDK_VERSION_MARKER = '0.27.15-alpha.5';
|
|
25270
25270
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
25271
25271
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
25272
25272
|
|
|
@@ -25368,37 +25368,30 @@ class Checkout {
|
|
|
25368
25368
|
async widgets(init) {
|
|
25369
25369
|
const checkout = this;
|
|
25370
25370
|
const factory = new Promise((resolve, reject) => {
|
|
25371
|
+
function checkForWidgetsFactory() {
|
|
25372
|
+
if (typeof ImmutableCheckoutWidgets !== 'undefined') {
|
|
25373
|
+
resolve(new ImmutableCheckoutWidgets.WidgetsFactory(checkout, init.config));
|
|
25374
|
+
}
|
|
25375
|
+
}
|
|
25371
25376
|
try {
|
|
25372
25377
|
const script = loadUnresolved(init.version);
|
|
25373
25378
|
if (script.loaded) {
|
|
25374
|
-
// eslint-disable-next-line no-
|
|
25375
|
-
|
|
25376
|
-
|
|
25377
|
-
const f = new ImmutableCheckoutWidgets.WidgetsFactory(checkout, init.config);
|
|
25378
|
-
resolve(f);
|
|
25379
|
-
}
|
|
25380
|
-
catch { /* Empty */ }
|
|
25381
|
-
}
|
|
25379
|
+
// eslint-disable-next-line no-console
|
|
25380
|
+
console.warn('Checkout widgets script is already loaded');
|
|
25381
|
+
checkForWidgetsFactory();
|
|
25382
25382
|
}
|
|
25383
25383
|
else {
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
|
|
25387
|
-
|
|
25388
|
-
|
|
25389
|
-
resolve(f);
|
|
25390
|
-
}
|
|
25391
|
-
catch { /* Empty */ }
|
|
25392
|
-
}
|
|
25393
|
-
};
|
|
25384
|
+
const observer = new MutationObserver((_, obs) => {
|
|
25385
|
+
checkForWidgetsFactory();
|
|
25386
|
+
obs.disconnect();
|
|
25387
|
+
});
|
|
25388
|
+
observer.observe(document.head, { childList: true, subtree: true });
|
|
25394
25389
|
}
|
|
25395
25390
|
}
|
|
25396
25391
|
catch (err) {
|
|
25397
25392
|
reject(err);
|
|
25398
25393
|
}
|
|
25399
25394
|
});
|
|
25400
|
-
// eslint-disable-next-line no-console
|
|
25401
|
-
console.log('factory', factory);
|
|
25402
25395
|
return factory;
|
|
25403
25396
|
}
|
|
25404
25397
|
/**
|
|
@@ -16,7 +16,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
16
16
|
chainID,
|
|
17
17
|
coreContractAddress,
|
|
18
18
|
registrationContractAddress,
|
|
19
|
-
sdkVersion: 'ts-immutable-sdk-0.27.15-alpha.
|
|
19
|
+
sdkVersion: 'ts-immutable-sdk-0.27.15-alpha.5',
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
22
22
|
* Sets `sdkVersion` at the time of build
|