@openfort/react 1.0.16 → 1.1.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/build/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OPENFORT_VERSION = "1.0
|
|
1
|
+
export declare const OPENFORT_VERSION = "1.1.0";
|
package/build/version.js
CHANGED
|
@@ -13,7 +13,6 @@ const defaultConnectors = ({ app, walletConnectProjectId, coinbaseWalletPreferen
|
|
|
13
13
|
connectors.push(coinbaseWallet({
|
|
14
14
|
appName: app.name,
|
|
15
15
|
appLogoUrl: app.icon,
|
|
16
|
-
overrideIsMetaMask: false,
|
|
17
16
|
preference: coinbaseWalletPreference,
|
|
18
17
|
}));
|
|
19
18
|
if (walletConnectProjectId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultConnectors.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultConnectors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -62,6 +62,20 @@ function embeddedWalletConnector() {
|
|
|
62
62
|
async getProvider() {
|
|
63
63
|
return _provider !== null && _provider !== void 0 ? _provider : undefined;
|
|
64
64
|
},
|
|
65
|
+
async switchChain({ chainId }) {
|
|
66
|
+
const provider = _provider;
|
|
67
|
+
if (!provider)
|
|
68
|
+
throw new Error('Embedded wallet provider not ready');
|
|
69
|
+
const chain = config.chains.find((c) => c.id === chainId);
|
|
70
|
+
if (!chain)
|
|
71
|
+
throw new Error(`Chain ${chainId} is not configured`);
|
|
72
|
+
await provider.request({
|
|
73
|
+
method: 'wallet_switchEthereumChain',
|
|
74
|
+
params: [{ chainId: `0x${chainId.toString(16)}` }],
|
|
75
|
+
});
|
|
76
|
+
config.emitter.emit('change', { chainId });
|
|
77
|
+
return chain;
|
|
78
|
+
},
|
|
65
79
|
async isAuthorized() {
|
|
66
80
|
if (!_provider)
|
|
67
81
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddedConnector.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embeddedConnector.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfort/react",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"author": "Openfort (https://www.openfort.io)",
|
|
5
5
|
"license": "BSD-2-Clause license",
|
|
6
6
|
"description": "The easiest way to integrate Openfort to your project.",
|
|
@@ -65,47 +65,55 @@
|
|
|
65
65
|
"react"
|
|
66
66
|
],
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@openfort/openfort-js": "1.3.
|
|
68
|
+
"@openfort/openfort-js": "^1.3.5",
|
|
69
69
|
"buffer": "^6.0.3",
|
|
70
70
|
"detect-browser": "^5.3.0",
|
|
71
71
|
"fast-password-entropy": "^1.1.1",
|
|
72
72
|
"framer-motion": "^6.3.11",
|
|
73
73
|
"qrcode": "^1.5.0",
|
|
74
74
|
"react-international-phone": "^4.6.0",
|
|
75
|
-
"react-is": "^19.
|
|
75
|
+
"react-is": "^19.2.7",
|
|
76
76
|
"react-transition-state": "^1.1.4",
|
|
77
77
|
"react-use-measure": "^2.1.1",
|
|
78
78
|
"resize-observer-polyfill": "^1.5.1",
|
|
79
79
|
"styled-components": "^5.3.5",
|
|
80
|
-
"zustand": "^5.0.
|
|
80
|
+
"zustand": "^5.0.14"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
+
"@coinbase/wallet-sdk": "^4.3.6",
|
|
84
|
+
"@safe-global/safe-apps-provider": "~0.18.6",
|
|
85
|
+
"@safe-global/safe-apps-sdk": "^9.1.0",
|
|
83
86
|
"@solana/kit": "^2.0.0 || ^5.0.0",
|
|
87
|
+
"@walletconnect/ethereum-provider": "^2.21.1",
|
|
84
88
|
"react": "17.x || 18.x || 19.x",
|
|
85
89
|
"react-dom": "17.x || 18.x || 19.x",
|
|
86
90
|
"viem": "2.x",
|
|
87
|
-
"wagmi": "
|
|
91
|
+
"wagmi": "3.x"
|
|
88
92
|
},
|
|
89
93
|
"devDependencies": {
|
|
90
|
-
"@biomejs/biome": "^2.
|
|
91
|
-
"@
|
|
94
|
+
"@biomejs/biome": "^2.4.16",
|
|
95
|
+
"@coinbase/wallet-sdk": "^4.3.7",
|
|
96
|
+
"@safe-global/safe-apps-provider": "~0.18.6",
|
|
97
|
+
"@safe-global/safe-apps-sdk": "^9.1.0",
|
|
98
|
+
"@tanstack/react-query": "^5.101.0",
|
|
92
99
|
"@testing-library/react": "^16.3.2",
|
|
93
100
|
"@testing-library/react-hooks": "^8.0.1",
|
|
94
|
-
"@types/node": "
|
|
101
|
+
"@types/node": "^25.9.2",
|
|
95
102
|
"@types/qrcode": "^1.4.2",
|
|
96
103
|
"@types/react": "^18.0.6",
|
|
97
104
|
"@types/react-dom": "^18.0.2",
|
|
98
105
|
"@types/styled-components": "^5.1.25",
|
|
99
|
-
"@wagmi/connectors": "^
|
|
100
|
-
"@wagmi/core": "^
|
|
101
|
-
"
|
|
102
|
-
"
|
|
106
|
+
"@wagmi/connectors": "^8.0.15",
|
|
107
|
+
"@wagmi/core": "^3.5.0",
|
|
108
|
+
"@walletconnect/ethereum-provider": "^2.23.9",
|
|
109
|
+
"happy-dom": "^20.10.2",
|
|
110
|
+
"jsdom": "^29.1.1",
|
|
103
111
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
104
|
-
"rollup-plugin-typescript2": "^0.
|
|
105
|
-
"typescript": "^5.
|
|
112
|
+
"rollup-plugin-typescript2": "^0.37.0",
|
|
113
|
+
"typescript": "^5.9.3",
|
|
106
114
|
"typescript-plugin-styled-components": "^2.0.0",
|
|
107
|
-
"vitest": "^
|
|
108
|
-
"wagmi": "^
|
|
115
|
+
"vitest": "^4.1.0",
|
|
116
|
+
"wagmi": "^3.6.16"
|
|
109
117
|
},
|
|
110
118
|
"peerDependenciesMeta": {
|
|
111
119
|
"@solana/kit": {
|
|
@@ -114,6 +122,18 @@
|
|
|
114
122
|
"wagmi": {
|
|
115
123
|
"optional": true
|
|
116
124
|
},
|
|
125
|
+
"@coinbase/wallet-sdk": {
|
|
126
|
+
"optional": true
|
|
127
|
+
},
|
|
128
|
+
"@walletconnect/ethereum-provider": {
|
|
129
|
+
"optional": true
|
|
130
|
+
},
|
|
131
|
+
"@safe-global/safe-apps-provider": {
|
|
132
|
+
"optional": true
|
|
133
|
+
},
|
|
134
|
+
"@safe-global/safe-apps-sdk": {
|
|
135
|
+
"optional": true
|
|
136
|
+
},
|
|
117
137
|
"@tanstack/react-query": {
|
|
118
138
|
"optional": true
|
|
119
139
|
}
|