Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
836be52724 Version Packages (#1959)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-15 20:26:55 -08:00
Joaquim VergesandGitHub 9f993dcc1e [EmbeddedWallet] fix switch chains logic (#1958) 2023-11-15 16:56:19 -08:00
17 changed files with 66 additions and 13 deletions
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/auth
## 4.1.7
### Patch Changes
- Updated dependencies [[`9f993dcc`](https://github.com/thirdweb-dev/js/commit/9f993dcc1e60cc087850b8fb9ce09524073ce0b5)]:
- @thirdweb-dev/wallets@2.1.4
## 4.1.6
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "4.1.6",
"version": "4.1.7",
"main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js",
"browser": {
+8
View File
@@ -1,5 +1,13 @@
# thirdweb
## 0.13.15
### Patch Changes
- Updated dependencies [[`9f993dcc`](https://github.com/thirdweb-dev/js/commit/9f993dcc1e60cc087850b8fb9ce09524073ce0b5)]:
- @thirdweb-dev/wallets@2.1.4
- @thirdweb-dev/auth@4.1.7
## 0.13.14
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.13.14",
"version": "0.13.15",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+8
View File
@@ -1,5 +1,13 @@
# @thirdweb-dev/react-core
## 4.1.5
### Patch Changes
- Updated dependencies [[`9f993dcc`](https://github.com/thirdweb-dev/js/commit/9f993dcc1e60cc087850b8fb9ce09524073ce0b5)]:
- @thirdweb-dev/wallets@2.1.4
- @thirdweb-dev/auth@4.1.7
## 4.1.4
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "4.1.4",
"version": "4.1.5",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -1,5 +1,7 @@
# @thirdweb-dev/react-native-compat
## 0.4.5
## 0.4.4
## 0.4.3
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@thirdweb-dev/react-native-compat",
"description": "Shims for Thirdweb in React Native Projects",
"version": "0.4.4",
"version": "0.4.5",
"author": "thirdweb eng <[email protected]>",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
"license": "Apache-2.0",
+8
View File
@@ -1,5 +1,13 @@
# @thirdweb-dev/react-native
## 0.4.5
### Patch Changes
- Updated dependencies [[`9f993dcc`](https://github.com/thirdweb-dev/js/commit/9f993dcc1e60cc087850b8fb9ce09524073ce0b5)]:
- @thirdweb-dev/wallets@2.1.4
- @thirdweb-dev/react-core@4.1.5
## 0.4.4
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-native",
"version": "0.4.4",
"version": "0.4.5",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+8
View File
@@ -1,5 +1,13 @@
# @thirdweb-dev/react
## 4.1.5
### Patch Changes
- Updated dependencies [[`9f993dcc`](https://github.com/thirdweb-dev/js/commit/9f993dcc1e60cc087850b8fb9ce09524073ce0b5)]:
- @thirdweb-dev/wallets@2.1.4
- @thirdweb-dev/react-core@4.1.5
## 4.1.4
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "4.1.4",
"version": "4.1.5",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+8
View File
@@ -1,5 +1,13 @@
# @thirdweb-dev/unity-js-bridge
## 0.2.101
### Patch Changes
- Updated dependencies [[`9f993dcc`](https://github.com/thirdweb-dev/js/commit/9f993dcc1e60cc087850b8fb9ce09524073ce0b5)]:
- @thirdweb-dev/wallets@2.1.4
- @thirdweb-dev/auth@4.1.7
## 0.2.100
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/unity-js-bridge",
"version": "0.2.100",
"version": "0.2.101",
"main": "dist/thirdweb-unity-bridge.js",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
"license": "Apache-2.0",
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/wallets
## 2.1.4
### Patch Changes
- [#1958](https://github.com/thirdweb-dev/js/pull/1958) [`9f993dcc`](https://github.com/thirdweb-dev/js/commit/9f993dcc1e60cc087850b8fb9ce09524073ce0b5) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix switch chain logic for embedded wallets
## 2.1.3
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/wallets",
"version": "2.1.3",
"version": "2.1.4",
"main": "dist/thirdweb-dev-wallets.cjs.js",
"module": "dist/thirdweb-dev-wallets.esm.js",
"types": "dist/thirdweb-dev-wallets.cjs.d.ts",
@@ -138,11 +138,7 @@ export class EmbeddedWalletConnector extends Connector<EmbeddedWalletConnectionA
throw new Error("Chain not configured");
}
if (
!this.user ||
!this.user.wallet ||
typeof this.user.wallet.getEthersJsSigner !== "function"
) {
try {
// update chain in wallet
await this.user?.wallet.setChain({ chain: "Ethereum" }); // just pass Ethereum no matter what chain we are going to connect
// update signer
@@ -150,6 +146,8 @@ export class EmbeddedWalletConnector extends Connector<EmbeddedWalletConnectionA
rpcEndpoint: chain.rpc[0] || "",
});
this.emit("change", { chain: { id: chainId, unsupported: false } });
} catch (e) {
console.warn("Failed to switch chain", e);
}
}