@subwallet/extension-inject 1.2.14-0 → 1.2.16-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/bundle.js +12 -7
- package/cjs/bundle.js +12 -7
- package/cjs/packageInfo.js +1 -1
- package/package.json +1 -1
- package/packageInfo.js +1 -1
package/bundle.js
CHANGED
|
@@ -36,15 +36,20 @@ export function injectEvmExtension(evmProvider) {
|
|
|
36
36
|
// Provider has been initialized in direct mode
|
|
37
37
|
windowInject.SubWallet = evmProvider;
|
|
38
38
|
}
|
|
39
|
+
if (!windowInject.ethereum) {
|
|
40
|
+
windowInject.ethereum = evmProvider;
|
|
41
|
+
windowInject.dispatchEvent(new Event('ethereum#initialized'));
|
|
42
|
+
}
|
|
39
43
|
windowInject.dispatchEvent(new Event('subwallet#initialized'));
|
|
40
44
|
|
|
41
|
-
// Publish to global if window.ethereum is not available
|
|
42
|
-
windowInject.addEventListener('load', () => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
});
|
|
45
|
+
// // Publish to global if window.ethereum is not available
|
|
46
|
+
// windowInject.addEventListener('load', () => {
|
|
47
|
+
// if (!windowInject.ethereum) {
|
|
48
|
+
// windowInject.ethereum = evmProvider;
|
|
49
|
+
// windowInject.dispatchEvent(new Event('ethereum#initialized'));
|
|
50
|
+
// }
|
|
51
|
+
// });
|
|
52
|
+
|
|
48
53
|
inject6963EIP(evmProvider);
|
|
49
54
|
}
|
|
50
55
|
export const eip6963ProviderInfo = {
|
package/cjs/bundle.js
CHANGED
|
@@ -50,15 +50,20 @@ function injectEvmExtension(evmProvider) {
|
|
|
50
50
|
// Provider has been initialized in direct mode
|
|
51
51
|
windowInject.SubWallet = evmProvider;
|
|
52
52
|
}
|
|
53
|
+
if (!windowInject.ethereum) {
|
|
54
|
+
windowInject.ethereum = evmProvider;
|
|
55
|
+
windowInject.dispatchEvent(new Event('ethereum#initialized'));
|
|
56
|
+
}
|
|
53
57
|
windowInject.dispatchEvent(new Event('subwallet#initialized'));
|
|
54
58
|
|
|
55
|
-
// Publish to global if window.ethereum is not available
|
|
56
|
-
windowInject.addEventListener('load', () => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
});
|
|
59
|
+
// // Publish to global if window.ethereum is not available
|
|
60
|
+
// windowInject.addEventListener('load', () => {
|
|
61
|
+
// if (!windowInject.ethereum) {
|
|
62
|
+
// windowInject.ethereum = evmProvider;
|
|
63
|
+
// windowInject.dispatchEvent(new Event('ethereum#initialized'));
|
|
64
|
+
// }
|
|
65
|
+
// });
|
|
66
|
+
|
|
62
67
|
inject6963EIP(evmProvider);
|
|
63
68
|
}
|
|
64
69
|
const eip6963ProviderInfo = {
|
package/cjs/packageInfo.js
CHANGED
package/package.json
CHANGED
package/packageInfo.js
CHANGED
|
@@ -7,5 +7,5 @@ export const packageInfo = {
|
|
|
7
7
|
name: '@subwallet/extension-inject',
|
|
8
8
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
9
9
|
type: 'esm',
|
|
10
|
-
version: '1.2.
|
|
10
|
+
version: '1.2.16-0'
|
|
11
11
|
};
|