@meshconnect/web-link-sdk 3.3.0 → 3.3.1

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 CHANGED
@@ -55,6 +55,7 @@ var currentOptions;
55
55
  var targetOrigin;
56
56
  var linkTokenOrigin;
57
57
  var currentIframeId = iframeId;
58
+ var bridgeParent = null;
58
59
  var iframeElement = function () {
59
60
  return document.getElementById(currentIframeId);
60
61
  };
@@ -118,6 +119,7 @@ function handleLinkEvent(event) {
118
119
  case 'done': {
119
120
  payload = (_g = event.data) === null || _g === void 0 ? void 0 : _g.payload;
120
121
  (_h = currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.onExit) === null || _h === void 0 ? void 0 : _h.call(currentOptions, payload === null || payload === void 0 ? void 0 : payload.errorMessage, payload);
122
+ bridgeParent === null || bridgeParent === void 0 ? void 0 : bridgeParent.destroy();
121
123
  removePopup();
122
124
  break;
123
125
  }
@@ -510,11 +512,12 @@ export var createLink = function (options) {
510
512
  targetOrigin = window.location.origin;
511
513
  var iframe = iframeElement();
512
514
  if (iframe) {
513
- new BridgeParent(iframe);
515
+ bridgeParent = new BridgeParent(iframe);
514
516
  }
515
517
  };
516
518
  var closeLink = function () {
517
519
  var _a;
520
+ bridgeParent === null || bridgeParent === void 0 ? void 0 : bridgeParent.destroy();
518
521
  removePopup();
519
522
  window.removeEventListener('message', eventsListener);
520
523
  (_a = options.onExit) === null || _a === void 0 ? void 0 : _a.call(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshconnect/web-link-sdk",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "A client-side JS library for integrating with Mesh Connect",
5
5
  "exports": "./index.js",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "@meshconnect/node-api": "^2.0.23",
26
26
  "@meshconnect/solana-web3.js": "^1.0.4",
27
- "@meshconnect/uwc-bridge-parent": "^0.0.2",
27
+ "@meshconnect/uwc-bridge-parent": "0.0.3",
28
28
  "bs58": "^5.0.0",
29
29
  "buffer": "^6.0.3",
30
30
  "ethers": "^6.11.1"
@@ -1 +1 @@
1
- export declare const sdkVersion = "3.3.0";
1
+ export declare const sdkVersion = "3.3.1";
package/utils/version.js CHANGED
@@ -1 +1 @@
1
- export var sdkVersion = '3.3.0';
1
+ export var sdkVersion = '3.3.1';