zerowallet-adapter 1.0.4 → 1.0.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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -99,7 +99,8 @@ declare function buildSignAllUrl(serializedTxsBase64: string[], callbackUrl: str
|
|
|
99
99
|
*/
|
|
100
100
|
declare function buildSignMessageUrl(messageBase64: string, callbackUrl: string, id: string, scheme?: string): string;
|
|
101
101
|
/**
|
|
102
|
-
* Attempts to open the deep link
|
|
102
|
+
* Attempts to open the deep link by creating an invisible anchor element and clicking it.
|
|
103
|
+
* This lets the OS intercept the scheme WITHOUT navigating the current page away.
|
|
103
104
|
*/
|
|
104
105
|
declare function openDeepLink(url: string): void;
|
|
105
106
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -99,7 +99,8 @@ declare function buildSignAllUrl(serializedTxsBase64: string[], callbackUrl: str
|
|
|
99
99
|
*/
|
|
100
100
|
declare function buildSignMessageUrl(messageBase64: string, callbackUrl: string, id: string, scheme?: string): string;
|
|
101
101
|
/**
|
|
102
|
-
* Attempts to open the deep link
|
|
102
|
+
* Attempts to open the deep link by creating an invisible anchor element and clicking it.
|
|
103
|
+
* This lets the OS intercept the scheme WITHOUT navigating the current page away.
|
|
103
104
|
*/
|
|
104
105
|
declare function openDeepLink(url: string): void;
|
|
105
106
|
/**
|
package/dist/index.js
CHANGED
|
@@ -121,7 +121,12 @@ function buildSignMessageUrl(messageBase64, callbackUrl, id, scheme = ZERO_WALLE
|
|
|
121
121
|
}
|
|
122
122
|
function openDeepLink(url) {
|
|
123
123
|
if (typeof window !== "undefined") {
|
|
124
|
-
|
|
124
|
+
const a = document.createElement("a");
|
|
125
|
+
a.href = url;
|
|
126
|
+
a.style.display = "none";
|
|
127
|
+
document.body.appendChild(a);
|
|
128
|
+
a.click();
|
|
129
|
+
setTimeout(() => document.body.removeChild(a), 1e3);
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
132
|
function isMobile() {
|