@imtbl/sdk 1.31.1-alpha.1 → 1.31.1-alpha.2
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 +4 -4
- 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 +40 -17
- package/dist/index.js +40 -17
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +37 -14
- package/dist/x.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -183,7 +183,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
183
183
|
};
|
|
184
184
|
|
|
185
185
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
186
|
-
const SDK_VERSION$1 = '1.31.1-alpha.
|
|
186
|
+
const SDK_VERSION$1 = '1.31.1-alpha.2';
|
|
187
187
|
const getFrameParentDomain$1 = () => {
|
|
188
188
|
if (isNode$1()) {
|
|
189
189
|
return '';
|
|
@@ -14194,7 +14194,7 @@ class MultiRollupApiClients {
|
|
|
14194
14194
|
}
|
|
14195
14195
|
|
|
14196
14196
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14197
|
-
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.
|
|
14197
|
+
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.2' };
|
|
14198
14198
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
14199
14199
|
if (!basePath.trim()) {
|
|
14200
14200
|
throw Error('basePath can not be empty');
|
|
@@ -14266,7 +14266,7 @@ class APIError extends Error {
|
|
|
14266
14266
|
|
|
14267
14267
|
/* eslint-disable implicit-arrow-linebreak */
|
|
14268
14268
|
const defaultHeaders$1 = {
|
|
14269
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.31.1-alpha.
|
|
14269
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.31.1-alpha.2',
|
|
14270
14270
|
};
|
|
14271
14271
|
/**
|
|
14272
14272
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -14740,7 +14740,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
|
|
|
14740
14740
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
14741
14741
|
class ApiConfiguration extends index$2.Configuration {
|
|
14742
14742
|
}
|
|
14743
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.
|
|
14743
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.2' };
|
|
14744
14744
|
/**
|
|
14745
14745
|
* @dev use createImmutableXConfiguration instead
|
|
14746
14746
|
*/
|
|
@@ -14779,7 +14779,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
14779
14779
|
chainID,
|
|
14780
14780
|
coreContractAddress,
|
|
14781
14781
|
registrationContractAddress,
|
|
14782
|
-
sdkVersion: 'ts-immutable-sdk-1.31.1-alpha.
|
|
14782
|
+
sdkVersion: 'ts-immutable-sdk-1.31.1-alpha.2',
|
|
14783
14783
|
baseConfig,
|
|
14784
14784
|
});
|
|
14785
14785
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -26324,7 +26324,7 @@ const getBlockedContents = () => `
|
|
|
26324
26324
|
`;
|
|
26325
26325
|
const getGenericContents = () => `
|
|
26326
26326
|
<p style="color: #b6b6b6; text-align: center; margin: 0">
|
|
26327
|
-
Secure pop-up
|
|
26327
|
+
Secure pop-up not showing?<br />We'll help you re-launch
|
|
26328
26328
|
</p>
|
|
26329
26329
|
`;
|
|
26330
26330
|
const getTryAgainButton = () => `
|
|
@@ -26462,6 +26462,8 @@ class ConfirmationScreen {
|
|
|
26462
26462
|
confirmationWindow;
|
|
26463
26463
|
popupOptions;
|
|
26464
26464
|
overlay;
|
|
26465
|
+
overlayClosed = false;
|
|
26466
|
+
timer;
|
|
26465
26467
|
constructor(config) {
|
|
26466
26468
|
this.config = config;
|
|
26467
26469
|
}
|
|
@@ -26572,7 +26574,6 @@ class ConfirmationScreen {
|
|
|
26572
26574
|
}
|
|
26573
26575
|
this.popupOptions = popupOptions;
|
|
26574
26576
|
try {
|
|
26575
|
-
// confirmationWindow need to call close on in try again, then reopen
|
|
26576
26577
|
this.confirmationWindow = openPopupCenter({
|
|
26577
26578
|
url: this.getHref('loading'),
|
|
26578
26579
|
title: CONFIRMATION_WINDOW_TITLE,
|
|
@@ -26585,7 +26586,21 @@ class ConfirmationScreen {
|
|
|
26585
26586
|
// If an error is thrown here then the popup is blocked
|
|
26586
26587
|
this.overlay = new Overlay(this.config.popupOverlayOptions, true);
|
|
26587
26588
|
}
|
|
26588
|
-
this.overlay.append(() =>
|
|
26589
|
+
this.overlay.append(() => {
|
|
26590
|
+
try {
|
|
26591
|
+
this.confirmationWindow?.close();
|
|
26592
|
+
this.confirmationWindow = openPopupCenter({
|
|
26593
|
+
url: this.getHref('loading'),
|
|
26594
|
+
title: CONFIRMATION_WINDOW_TITLE,
|
|
26595
|
+
width: this.popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
|
|
26596
|
+
height: this.popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
|
|
26597
|
+
});
|
|
26598
|
+
}
|
|
26599
|
+
catch { /* Empty */ }
|
|
26600
|
+
}, () => {
|
|
26601
|
+
this.overlayClosed = true;
|
|
26602
|
+
this.closeWindow();
|
|
26603
|
+
});
|
|
26589
26604
|
}
|
|
26590
26605
|
closeWindow() {
|
|
26591
26606
|
this.confirmationWindow?.close();
|
|
@@ -26595,32 +26610,40 @@ class ConfirmationScreen {
|
|
|
26595
26610
|
showConfirmationScreen(href, messageHandler, resolve) {
|
|
26596
26611
|
// If popup blocked, the confirmation window will not exist
|
|
26597
26612
|
if (this.confirmationWindow) {
|
|
26598
|
-
this.confirmationWindow.location.href = href;
|
|
26613
|
+
this.confirmationWindow.location.href = href;
|
|
26599
26614
|
}
|
|
26600
26615
|
// This indicates the user closed the overlay so the transaction should be rejected
|
|
26601
26616
|
if (!this.overlay) {
|
|
26617
|
+
this.overlayClosed = false;
|
|
26602
26618
|
resolve({ confirmed: false });
|
|
26603
26619
|
return;
|
|
26604
26620
|
}
|
|
26605
|
-
this.overlay.update(() => this.recreateConfirmationWindow(href));
|
|
26606
26621
|
// https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascript/48240128#48240128
|
|
26607
|
-
const
|
|
26608
|
-
if (this.confirmationWindow?.closed) {
|
|
26609
|
-
clearInterval(timer);
|
|
26622
|
+
const timerCallback = () => {
|
|
26623
|
+
if (this.confirmationWindow?.closed || this.overlayClosed) {
|
|
26624
|
+
clearInterval(this.timer);
|
|
26610
26625
|
window.removeEventListener('message', messageHandler);
|
|
26611
26626
|
resolve({ confirmed: false });
|
|
26627
|
+
this.overlayClosed = false;
|
|
26612
26628
|
this.confirmationWindow = undefined;
|
|
26613
26629
|
}
|
|
26614
|
-
}
|
|
26630
|
+
};
|
|
26631
|
+
this.timer = setInterval(timerCallback, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
|
|
26632
|
+
this.overlay.update(() => this.recreateConfirmationWindow(href, timerCallback));
|
|
26615
26633
|
}
|
|
26616
|
-
recreateConfirmationWindow(href) {
|
|
26634
|
+
recreateConfirmationWindow(href, timerCallback) {
|
|
26617
26635
|
try {
|
|
26636
|
+
// Clears and recreates the timer to ensure when the confirmation window
|
|
26637
|
+
// is closed and recreated the transaction is not rejected.
|
|
26638
|
+
clearInterval(this.timer);
|
|
26639
|
+
this.confirmationWindow?.close();
|
|
26618
26640
|
this.confirmationWindow = openPopupCenter({
|
|
26619
26641
|
url: href,
|
|
26620
26642
|
title: CONFIRMATION_WINDOW_TITLE,
|
|
26621
26643
|
width: this.popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
|
|
26622
26644
|
height: this.popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
|
|
26623
26645
|
});
|
|
26646
|
+
this.timer = setInterval(timerCallback, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
|
|
26624
26647
|
}
|
|
26625
26648
|
catch { /* Empty */ }
|
|
26626
26649
|
}
|
|
@@ -57903,7 +57926,7 @@ const flattenProperties = (properties) => {
|
|
|
57903
57926
|
};
|
|
57904
57927
|
|
|
57905
57928
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
57906
|
-
const SDK_VERSION = '1.31.1-alpha.
|
|
57929
|
+
const SDK_VERSION = '1.31.1-alpha.2';
|
|
57907
57930
|
const getFrameParentDomain = () => {
|
|
57908
57931
|
if (isNode()) {
|
|
57909
57932
|
return '';
|
|
@@ -63125,7 +63148,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
63125
63148
|
maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
|
|
63126
63149
|
};
|
|
63127
63150
|
|
|
63128
|
-
const SDK_VERSION_MARKER = '1.31.1-alpha.
|
|
63151
|
+
const SDK_VERSION_MARKER = '1.31.1-alpha.2';
|
|
63129
63152
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
63130
63153
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
63131
63154
|
|
package/dist/index.js
CHANGED
|
@@ -160,7 +160,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
160
160
|
};
|
|
161
161
|
|
|
162
162
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
163
|
-
const SDK_VERSION$1 = '1.31.1-alpha.
|
|
163
|
+
const SDK_VERSION$1 = '1.31.1-alpha.2';
|
|
164
164
|
const getFrameParentDomain$1 = () => {
|
|
165
165
|
if (isNode$1()) {
|
|
166
166
|
return '';
|
|
@@ -14171,7 +14171,7 @@ class MultiRollupApiClients {
|
|
|
14171
14171
|
}
|
|
14172
14172
|
|
|
14173
14173
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14174
|
-
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.
|
|
14174
|
+
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.2' };
|
|
14175
14175
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
14176
14176
|
if (!basePath.trim()) {
|
|
14177
14177
|
throw Error('basePath can not be empty');
|
|
@@ -14243,7 +14243,7 @@ class APIError extends Error {
|
|
|
14243
14243
|
|
|
14244
14244
|
/* eslint-disable implicit-arrow-linebreak */
|
|
14245
14245
|
const defaultHeaders$1 = {
|
|
14246
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.31.1-alpha.
|
|
14246
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.31.1-alpha.2',
|
|
14247
14247
|
};
|
|
14248
14248
|
/**
|
|
14249
14249
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -14717,7 +14717,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
|
|
|
14717
14717
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
14718
14718
|
class ApiConfiguration extends index$2.Configuration {
|
|
14719
14719
|
}
|
|
14720
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.
|
|
14720
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.2' };
|
|
14721
14721
|
/**
|
|
14722
14722
|
* @dev use createImmutableXConfiguration instead
|
|
14723
14723
|
*/
|
|
@@ -14756,7 +14756,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
14756
14756
|
chainID,
|
|
14757
14757
|
coreContractAddress,
|
|
14758
14758
|
registrationContractAddress,
|
|
14759
|
-
sdkVersion: 'ts-immutable-sdk-1.31.1-alpha.
|
|
14759
|
+
sdkVersion: 'ts-immutable-sdk-1.31.1-alpha.2',
|
|
14760
14760
|
baseConfig,
|
|
14761
14761
|
});
|
|
14762
14762
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -26301,7 +26301,7 @@ const getBlockedContents = () => `
|
|
|
26301
26301
|
`;
|
|
26302
26302
|
const getGenericContents = () => `
|
|
26303
26303
|
<p style="color: #b6b6b6; text-align: center; margin: 0">
|
|
26304
|
-
Secure pop-up
|
|
26304
|
+
Secure pop-up not showing?<br />We'll help you re-launch
|
|
26305
26305
|
</p>
|
|
26306
26306
|
`;
|
|
26307
26307
|
const getTryAgainButton = () => `
|
|
@@ -26439,6 +26439,8 @@ class ConfirmationScreen {
|
|
|
26439
26439
|
confirmationWindow;
|
|
26440
26440
|
popupOptions;
|
|
26441
26441
|
overlay;
|
|
26442
|
+
overlayClosed = false;
|
|
26443
|
+
timer;
|
|
26442
26444
|
constructor(config) {
|
|
26443
26445
|
this.config = config;
|
|
26444
26446
|
}
|
|
@@ -26549,7 +26551,6 @@ class ConfirmationScreen {
|
|
|
26549
26551
|
}
|
|
26550
26552
|
this.popupOptions = popupOptions;
|
|
26551
26553
|
try {
|
|
26552
|
-
// confirmationWindow need to call close on in try again, then reopen
|
|
26553
26554
|
this.confirmationWindow = openPopupCenter({
|
|
26554
26555
|
url: this.getHref('loading'),
|
|
26555
26556
|
title: CONFIRMATION_WINDOW_TITLE,
|
|
@@ -26562,7 +26563,21 @@ class ConfirmationScreen {
|
|
|
26562
26563
|
// If an error is thrown here then the popup is blocked
|
|
26563
26564
|
this.overlay = new Overlay(this.config.popupOverlayOptions, true);
|
|
26564
26565
|
}
|
|
26565
|
-
this.overlay.append(() =>
|
|
26566
|
+
this.overlay.append(() => {
|
|
26567
|
+
try {
|
|
26568
|
+
this.confirmationWindow?.close();
|
|
26569
|
+
this.confirmationWindow = openPopupCenter({
|
|
26570
|
+
url: this.getHref('loading'),
|
|
26571
|
+
title: CONFIRMATION_WINDOW_TITLE,
|
|
26572
|
+
width: this.popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
|
|
26573
|
+
height: this.popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
|
|
26574
|
+
});
|
|
26575
|
+
}
|
|
26576
|
+
catch { /* Empty */ }
|
|
26577
|
+
}, () => {
|
|
26578
|
+
this.overlayClosed = true;
|
|
26579
|
+
this.closeWindow();
|
|
26580
|
+
});
|
|
26566
26581
|
}
|
|
26567
26582
|
closeWindow() {
|
|
26568
26583
|
this.confirmationWindow?.close();
|
|
@@ -26572,32 +26587,40 @@ class ConfirmationScreen {
|
|
|
26572
26587
|
showConfirmationScreen(href, messageHandler, resolve) {
|
|
26573
26588
|
// If popup blocked, the confirmation window will not exist
|
|
26574
26589
|
if (this.confirmationWindow) {
|
|
26575
|
-
this.confirmationWindow.location.href = href;
|
|
26590
|
+
this.confirmationWindow.location.href = href;
|
|
26576
26591
|
}
|
|
26577
26592
|
// This indicates the user closed the overlay so the transaction should be rejected
|
|
26578
26593
|
if (!this.overlay) {
|
|
26594
|
+
this.overlayClosed = false;
|
|
26579
26595
|
resolve({ confirmed: false });
|
|
26580
26596
|
return;
|
|
26581
26597
|
}
|
|
26582
|
-
this.overlay.update(() => this.recreateConfirmationWindow(href));
|
|
26583
26598
|
// https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascript/48240128#48240128
|
|
26584
|
-
const
|
|
26585
|
-
if (this.confirmationWindow?.closed) {
|
|
26586
|
-
clearInterval(timer);
|
|
26599
|
+
const timerCallback = () => {
|
|
26600
|
+
if (this.confirmationWindow?.closed || this.overlayClosed) {
|
|
26601
|
+
clearInterval(this.timer);
|
|
26587
26602
|
window.removeEventListener('message', messageHandler);
|
|
26588
26603
|
resolve({ confirmed: false });
|
|
26604
|
+
this.overlayClosed = false;
|
|
26589
26605
|
this.confirmationWindow = undefined;
|
|
26590
26606
|
}
|
|
26591
|
-
}
|
|
26607
|
+
};
|
|
26608
|
+
this.timer = setInterval(timerCallback, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
|
|
26609
|
+
this.overlay.update(() => this.recreateConfirmationWindow(href, timerCallback));
|
|
26592
26610
|
}
|
|
26593
|
-
recreateConfirmationWindow(href) {
|
|
26611
|
+
recreateConfirmationWindow(href, timerCallback) {
|
|
26594
26612
|
try {
|
|
26613
|
+
// Clears and recreates the timer to ensure when the confirmation window
|
|
26614
|
+
// is closed and recreated the transaction is not rejected.
|
|
26615
|
+
clearInterval(this.timer);
|
|
26616
|
+
this.confirmationWindow?.close();
|
|
26595
26617
|
this.confirmationWindow = openPopupCenter({
|
|
26596
26618
|
url: href,
|
|
26597
26619
|
title: CONFIRMATION_WINDOW_TITLE,
|
|
26598
26620
|
width: this.popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
|
|
26599
26621
|
height: this.popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
|
|
26600
26622
|
});
|
|
26623
|
+
this.timer = setInterval(timerCallback, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
|
|
26601
26624
|
}
|
|
26602
26625
|
catch { /* Empty */ }
|
|
26603
26626
|
}
|
|
@@ -57880,7 +57903,7 @@ const flattenProperties = (properties) => {
|
|
|
57880
57903
|
};
|
|
57881
57904
|
|
|
57882
57905
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
57883
|
-
const SDK_VERSION = '1.31.1-alpha.
|
|
57906
|
+
const SDK_VERSION = '1.31.1-alpha.2';
|
|
57884
57907
|
const getFrameParentDomain = () => {
|
|
57885
57908
|
if (isNode()) {
|
|
57886
57909
|
return '';
|
|
@@ -63102,7 +63125,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
63102
63125
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
63103
63126
|
};
|
|
63104
63127
|
|
|
63105
|
-
const SDK_VERSION_MARKER = '1.31.1-alpha.
|
|
63128
|
+
const SDK_VERSION_MARKER = '1.31.1-alpha.2';
|
|
63106
63129
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
63107
63130
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
63108
63131
|
|
package/dist/orderbook.js
CHANGED
|
@@ -132,7 +132,7 @@ const flattenProperties = (properties) => {
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
135
|
-
const SDK_VERSION = '1.31.1-alpha.
|
|
135
|
+
const SDK_VERSION = '1.31.1-alpha.2';
|
|
136
136
|
const getFrameParentDomain = () => {
|
|
137
137
|
if (isNode()) {
|
|
138
138
|
return '';
|
package/dist/passport.js
CHANGED
|
@@ -11444,7 +11444,7 @@ class MultiRollupApiClients {
|
|
|
11444
11444
|
}
|
|
11445
11445
|
|
|
11446
11446
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11447
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.
|
|
11447
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.2' };
|
|
11448
11448
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
11449
11449
|
if (!basePath.trim()) {
|
|
11450
11450
|
throw Error('basePath can not be empty');
|
|
@@ -11623,7 +11623,7 @@ const flattenProperties = (properties) => {
|
|
|
11623
11623
|
};
|
|
11624
11624
|
|
|
11625
11625
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
11626
|
-
const SDK_VERSION = '1.31.1-alpha.
|
|
11626
|
+
const SDK_VERSION = '1.31.1-alpha.2';
|
|
11627
11627
|
const getFrameParentDomain = () => {
|
|
11628
11628
|
if (isNode()) {
|
|
11629
11629
|
return '';
|
|
@@ -12013,7 +12013,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
12013
12013
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
12014
12014
|
class ApiConfiguration extends index$2.Configuration {
|
|
12015
12015
|
}
|
|
12016
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.
|
|
12016
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.2' };
|
|
12017
12017
|
/**
|
|
12018
12018
|
* @dev use createImmutableXConfiguration instead
|
|
12019
12019
|
*/
|
|
@@ -12052,7 +12052,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
12052
12052
|
chainID,
|
|
12053
12053
|
coreContractAddress,
|
|
12054
12054
|
registrationContractAddress,
|
|
12055
|
-
sdkVersion: 'ts-immutable-sdk-1.31.1-alpha.
|
|
12055
|
+
sdkVersion: 'ts-immutable-sdk-1.31.1-alpha.2',
|
|
12056
12056
|
baseConfig,
|
|
12057
12057
|
});
|
|
12058
12058
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -21161,7 +21161,7 @@ const getBlockedContents = () => `
|
|
|
21161
21161
|
`;
|
|
21162
21162
|
const getGenericContents = () => `
|
|
21163
21163
|
<p style="color: #b6b6b6; text-align: center; margin: 0">
|
|
21164
|
-
Secure pop-up
|
|
21164
|
+
Secure pop-up not showing?<br />We'll help you re-launch
|
|
21165
21165
|
</p>
|
|
21166
21166
|
`;
|
|
21167
21167
|
const getTryAgainButton = () => `
|
|
@@ -21299,6 +21299,8 @@ class ConfirmationScreen {
|
|
|
21299
21299
|
confirmationWindow;
|
|
21300
21300
|
popupOptions;
|
|
21301
21301
|
overlay;
|
|
21302
|
+
overlayClosed = false;
|
|
21303
|
+
timer;
|
|
21302
21304
|
constructor(config) {
|
|
21303
21305
|
this.config = config;
|
|
21304
21306
|
}
|
|
@@ -21409,7 +21411,6 @@ class ConfirmationScreen {
|
|
|
21409
21411
|
}
|
|
21410
21412
|
this.popupOptions = popupOptions;
|
|
21411
21413
|
try {
|
|
21412
|
-
// confirmationWindow need to call close on in try again, then reopen
|
|
21413
21414
|
this.confirmationWindow = openPopupCenter({
|
|
21414
21415
|
url: this.getHref('loading'),
|
|
21415
21416
|
title: CONFIRMATION_WINDOW_TITLE,
|
|
@@ -21422,7 +21423,21 @@ class ConfirmationScreen {
|
|
|
21422
21423
|
// If an error is thrown here then the popup is blocked
|
|
21423
21424
|
this.overlay = new Overlay(this.config.popupOverlayOptions, true);
|
|
21424
21425
|
}
|
|
21425
|
-
this.overlay.append(() =>
|
|
21426
|
+
this.overlay.append(() => {
|
|
21427
|
+
try {
|
|
21428
|
+
this.confirmationWindow?.close();
|
|
21429
|
+
this.confirmationWindow = openPopupCenter({
|
|
21430
|
+
url: this.getHref('loading'),
|
|
21431
|
+
title: CONFIRMATION_WINDOW_TITLE,
|
|
21432
|
+
width: this.popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
|
|
21433
|
+
height: this.popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
|
|
21434
|
+
});
|
|
21435
|
+
}
|
|
21436
|
+
catch { /* Empty */ }
|
|
21437
|
+
}, () => {
|
|
21438
|
+
this.overlayClosed = true;
|
|
21439
|
+
this.closeWindow();
|
|
21440
|
+
});
|
|
21426
21441
|
}
|
|
21427
21442
|
closeWindow() {
|
|
21428
21443
|
this.confirmationWindow?.close();
|
|
@@ -21432,32 +21447,40 @@ class ConfirmationScreen {
|
|
|
21432
21447
|
showConfirmationScreen(href, messageHandler, resolve) {
|
|
21433
21448
|
// If popup blocked, the confirmation window will not exist
|
|
21434
21449
|
if (this.confirmationWindow) {
|
|
21435
|
-
this.confirmationWindow.location.href = href;
|
|
21450
|
+
this.confirmationWindow.location.href = href;
|
|
21436
21451
|
}
|
|
21437
21452
|
// This indicates the user closed the overlay so the transaction should be rejected
|
|
21438
21453
|
if (!this.overlay) {
|
|
21454
|
+
this.overlayClosed = false;
|
|
21439
21455
|
resolve({ confirmed: false });
|
|
21440
21456
|
return;
|
|
21441
21457
|
}
|
|
21442
|
-
this.overlay.update(() => this.recreateConfirmationWindow(href));
|
|
21443
21458
|
// https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascript/48240128#48240128
|
|
21444
|
-
const
|
|
21445
|
-
if (this.confirmationWindow?.closed) {
|
|
21446
|
-
clearInterval(timer);
|
|
21459
|
+
const timerCallback = () => {
|
|
21460
|
+
if (this.confirmationWindow?.closed || this.overlayClosed) {
|
|
21461
|
+
clearInterval(this.timer);
|
|
21447
21462
|
window.removeEventListener('message', messageHandler);
|
|
21448
21463
|
resolve({ confirmed: false });
|
|
21464
|
+
this.overlayClosed = false;
|
|
21449
21465
|
this.confirmationWindow = undefined;
|
|
21450
21466
|
}
|
|
21451
|
-
}
|
|
21467
|
+
};
|
|
21468
|
+
this.timer = setInterval(timerCallback, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
|
|
21469
|
+
this.overlay.update(() => this.recreateConfirmationWindow(href, timerCallback));
|
|
21452
21470
|
}
|
|
21453
|
-
recreateConfirmationWindow(href) {
|
|
21471
|
+
recreateConfirmationWindow(href, timerCallback) {
|
|
21454
21472
|
try {
|
|
21473
|
+
// Clears and recreates the timer to ensure when the confirmation window
|
|
21474
|
+
// is closed and recreated the transaction is not rejected.
|
|
21475
|
+
clearInterval(this.timer);
|
|
21476
|
+
this.confirmationWindow?.close();
|
|
21455
21477
|
this.confirmationWindow = openPopupCenter({
|
|
21456
21478
|
url: href,
|
|
21457
21479
|
title: CONFIRMATION_WINDOW_TITLE,
|
|
21458
21480
|
width: this.popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
|
|
21459
21481
|
height: this.popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
|
|
21460
21482
|
});
|
|
21483
|
+
this.timer = setInterval(timerCallback, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
|
|
21461
21484
|
}
|
|
21462
21485
|
catch { /* Empty */ }
|
|
21463
21486
|
}
|
package/dist/x.js
CHANGED
|
@@ -9003,7 +9003,7 @@ const flattenProperties = (properties) => {
|
|
|
9003
9003
|
};
|
|
9004
9004
|
|
|
9005
9005
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
9006
|
-
const SDK_VERSION = '1.31.1-alpha.
|
|
9006
|
+
const SDK_VERSION = '1.31.1-alpha.2';
|
|
9007
9007
|
const getFrameParentDomain = () => {
|
|
9008
9008
|
if (isNode()) {
|
|
9009
9009
|
return '';
|
|
@@ -9269,7 +9269,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
9269
9269
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
9270
9270
|
class ApiConfiguration extends index$2.Configuration {
|
|
9271
9271
|
}
|
|
9272
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.
|
|
9272
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.31.1-alpha.2' };
|
|
9273
9273
|
/**
|
|
9274
9274
|
* @dev use createImmutableXConfiguration instead
|
|
9275
9275
|
*/
|
|
@@ -9308,7 +9308,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
9308
9308
|
chainID,
|
|
9309
9309
|
coreContractAddress,
|
|
9310
9310
|
registrationContractAddress,
|
|
9311
|
-
sdkVersion: 'ts-immutable-sdk-1.31.1-alpha.
|
|
9311
|
+
sdkVersion: 'ts-immutable-sdk-1.31.1-alpha.2',
|
|
9312
9312
|
baseConfig,
|
|
9313
9313
|
});
|
|
9314
9314
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
package/package.json
CHANGED