@canton-network/dapp-sdk 1.3.0 → 1.4.0
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/adapter/walletconnect-adapter.d.ts.map +1 -1
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -901,7 +901,17 @@ var WalletConnectAdapter = class _WalletConnectAdapter {
|
|
|
901
901
|
});
|
|
902
902
|
} catch {
|
|
903
903
|
}
|
|
904
|
-
|
|
904
|
+
const targetOrigin = typeof window !== "undefined" ? window.location.origin : "*";
|
|
905
|
+
if (targetOrigin !== "*") {
|
|
906
|
+
popupWin.postMessage(
|
|
907
|
+
{ type: "wc-uri", uri, qrDataUrl },
|
|
908
|
+
targetOrigin
|
|
909
|
+
);
|
|
910
|
+
} else {
|
|
911
|
+
throw new Error(
|
|
912
|
+
"Cannot securely send WalletConnect URI: Origin undefined"
|
|
913
|
+
);
|
|
914
|
+
}
|
|
905
915
|
} catch {
|
|
906
916
|
}
|
|
907
917
|
}
|