@portal-hq/webview 4.2.6 → 4.2.7
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/lib/commonjs/index.js +2 -2
- package/lib/esm/index.js +2 -2
- package/package.json +5 -5
- package/src/index.tsx +4 -3
package/lib/commonjs/index.js
CHANGED
|
@@ -95,10 +95,10 @@ const Webview = (0, react_1.memo)((0, react_1.forwardRef)(({ onNavigationStateCh
|
|
|
95
95
|
};
|
|
96
96
|
const handlePostMessage = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
97
97
|
const { type, data } = JSON.parse(event.nativeEvent.data);
|
|
98
|
-
const { method, params } = data;
|
|
98
|
+
const { method, params, options } = data;
|
|
99
99
|
switch (type) {
|
|
100
100
|
case 'portal_sign':
|
|
101
|
-
yield portal.request(method, params, `eip155:${chainId}
|
|
101
|
+
yield portal.request(method, params, `eip155:${chainId}`, options);
|
|
102
102
|
break;
|
|
103
103
|
}
|
|
104
104
|
});
|
package/lib/esm/index.js
CHANGED
|
@@ -67,10 +67,10 @@ const Webview = memo(forwardRef(({ onNavigationStateChange, onSigningRequested,
|
|
|
67
67
|
};
|
|
68
68
|
const handlePostMessage = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
69
|
const { type, data } = JSON.parse(event.nativeEvent.data);
|
|
70
|
-
const { method, params } = data;
|
|
70
|
+
const { method, params, options } = data;
|
|
71
71
|
switch (type) {
|
|
72
72
|
case 'portal_sign':
|
|
73
|
-
yield portal.request(method, params, `eip155:${chainId}
|
|
73
|
+
yield portal.request(method, params, `eip155:${chainId}`, options);
|
|
74
74
|
break;
|
|
75
75
|
}
|
|
76
76
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portal-hq/webview",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/esm/index",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"test": "jest --passWithNoTests"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@portal-hq/core": "^4.2.
|
|
22
|
-
"@portal-hq/injected-provider": "^4.2.
|
|
23
|
-
"@portal-hq/utils": "^4.2.
|
|
21
|
+
"@portal-hq/core": "^4.2.7",
|
|
22
|
+
"@portal-hq/injected-provider": "^4.2.7",
|
|
23
|
+
"@portal-hq/utils": "^4.2.7"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/jest": "^29.2.0",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"react-native": "*",
|
|
37
37
|
"react-native-webview": "*"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "d398df655803c96d576463cbd19ba023fc13c2b7"
|
|
40
40
|
}
|
package/src/index.tsx
CHANGED
|
@@ -97,19 +97,20 @@ const Webview = memo(
|
|
|
97
97
|
|
|
98
98
|
const handlePostMessage = async (event: WebViewMessageEvent) => {
|
|
99
99
|
const { type, data } = JSON.parse(event.nativeEvent.data)
|
|
100
|
-
const { method, params } = data as RequestArguments
|
|
101
|
-
|
|
100
|
+
const { method, params, options } = data as RequestArguments
|
|
101
|
+
|
|
102
102
|
switch (type) {
|
|
103
103
|
case 'portal_sign':
|
|
104
104
|
await portal.request(
|
|
105
105
|
method,
|
|
106
106
|
params as unknown[],
|
|
107
107
|
`eip155:${chainId}`,
|
|
108
|
+
options,
|
|
108
109
|
)
|
|
109
110
|
break
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
|
|
113
|
+
|
|
113
114
|
// Initialize Portal Bindings and set the wallet address
|
|
114
115
|
useEffect(() => {
|
|
115
116
|
if (portal && !initialized.current) {
|