@meshconnect/web-link-sdk 3.1.7 → 3.1.8
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/Link.js +2 -5
- package/package.json +2 -2
- package/utils/event-types.d.ts +3 -3
- package/utils/types.d.ts +2 -2
- package/utils/version.d.ts +1 -1
- package/utils/version.js +1 -1
package/Link.js
CHANGED
@@ -373,7 +373,7 @@ function handleErrorAndSendMessage(error, messageType) {
|
|
373
373
|
}
|
374
374
|
export var createLink = function (options) {
|
375
375
|
var openLink = function (linkToken) { return __awaiter(void 0, void 0, void 0, function () {
|
376
|
-
var linkUrl
|
376
|
+
var linkUrl;
|
377
377
|
var _a;
|
378
378
|
return __generator(this, function (_b) {
|
379
379
|
if (!linkToken) {
|
@@ -382,13 +382,10 @@ export var createLink = function (options) {
|
|
382
382
|
}
|
383
383
|
currentOptions = options;
|
384
384
|
linkUrl = window.atob(linkToken);
|
385
|
-
iframeUrlObject = new URL(linkUrl);
|
386
|
-
if (iframeUrlObject.origin) {
|
387
|
-
possibleOrigins.add(iframeUrlObject.origin);
|
388
|
-
}
|
389
385
|
window.removeEventListener('message', eventsListener);
|
390
386
|
addPopup(linkUrl, currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.language);
|
391
387
|
window.addEventListener('message', eventsListener);
|
388
|
+
possibleOrigins.add(window.location.origin);
|
392
389
|
return [2 /*return*/];
|
393
390
|
});
|
394
391
|
}); };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@meshconnect/web-link-sdk",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.8",
|
4
4
|
"description": "A client-side JS library for integrating with Mesh Connect",
|
5
5
|
"exports": "./index.js",
|
6
6
|
"license": "MIT",
|
@@ -60,4 +60,4 @@
|
|
60
60
|
"module": "./index.js",
|
61
61
|
"main": "./index.js",
|
62
62
|
"types": "./index.d.ts"
|
63
|
-
}
|
63
|
+
}
|
package/utils/event-types.d.ts
CHANGED
@@ -138,11 +138,11 @@ export interface TransferKycRequired extends LinkEventBase {
|
|
138
138
|
}
|
139
139
|
export interface DoneEvent extends LinkEventBase {
|
140
140
|
type: 'done';
|
141
|
-
payload:
|
141
|
+
payload: SessionSummary;
|
142
142
|
}
|
143
143
|
export interface CloseEvent extends LinkEventBase {
|
144
144
|
type: 'close';
|
145
|
-
payload:
|
145
|
+
payload: SessionSummary;
|
146
146
|
}
|
147
147
|
export interface WalletMessageSigned extends LinkEventBase {
|
148
148
|
type: 'walletMessageSigned';
|
@@ -160,7 +160,7 @@ export interface VerifyDonePage extends LinkEventBase {
|
|
160
160
|
export interface VerifyWalletRejected extends LinkEventBase {
|
161
161
|
type: 'verifyWalletRejected';
|
162
162
|
}
|
163
|
-
export interface
|
163
|
+
export interface SessionSummary {
|
164
164
|
/**
|
165
165
|
* Current page of application. Possible values:
|
166
166
|
* `startPage`
|
package/utils/types.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { BrokerType } from '@meshconnect/node-api';
|
2
|
-
import {
|
2
|
+
import { SessionSummary, LinkEventType } from './event-types';
|
3
3
|
export type EventType = 'brokerageAccountAccessToken' | 'delayedAuthentication' | 'loaded' | 'transferFinished';
|
4
4
|
export interface Link {
|
5
5
|
/**
|
@@ -124,7 +124,7 @@ export interface LinkOptions {
|
|
124
124
|
/**
|
125
125
|
* (Optional) A callback function that is called when the Front iframe is closed.
|
126
126
|
*/
|
127
|
-
onExit?: (error?: string, summary?:
|
127
|
+
onExit?: (error?: string, summary?: SessionSummary) => void;
|
128
128
|
/**
|
129
129
|
* (Optional) A callback function that is called when a transfer is finished.
|
130
130
|
* It receives a payload of type `TransferFinishedPayload`.
|
package/utils/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const sdkVersion = "3.1.
|
1
|
+
export declare const sdkVersion = "3.1.8";
|
package/utils/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export var sdkVersion = '3.1.
|
1
|
+
export var sdkVersion = '3.1.8';
|