We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
predictAddress
1 parent 48e6427 commit bfdfc23Copy full SHA for bfdfc23
.changeset/flat-turkeys-promise.md
@@ -0,0 +1,5 @@
1
+---
2
+"thirdweb": patch
3
4
+
5
+Better error message for failed smart wallet connections
packages/thirdweb/src/wallets/smart/index.ts
@@ -63,7 +63,13 @@ export async function connectSmartWallet(
63
const accountAddress = await predictAddress(factoryContract, {
64
personalAccountAddress: personalAccount.address,
65
...options,
66
- });
+ })
67
+ .then((address) => address)
68
+ .catch(() => {
69
+ throw new Error(
70
+ `Failed to get account address with factory contract ${factoryContract.address} on chain ID ${chain.id}. Are you on the right chain?`,
71
+ );
72
+ });
73
74
const accountContract = getContract({
75
client,
0 commit comments