Skip to content

Commit 5fc1d4e

Browse files
shortcut
1 parent 9e3fc9a commit 5fc1d4e

File tree

1 file changed

+8
-8
lines changed
  • packages/thirdweb/src/wallets/smart/lib

1 file changed

+8
-8
lines changed

packages/thirdweb/src/wallets/smart/lib/calls.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ export async function predictAddress(args: {
8383
if (predictAddress) {
8484
return predictAddress(factoryContract, adminAddress);
8585
}
86+
if (accountAddress) {
87+
return accountAddress;
88+
}
89+
if (!adminAddress) {
90+
throw new Error(
91+
"Account address is required to predict the smart wallet address.",
92+
);
93+
}
8694
return withCache(
8795
async () => {
88-
if (accountAddress) {
89-
return accountAddress;
90-
}
91-
if (!adminAddress) {
92-
throw new Error(
93-
"Account address is required to predict the smart wallet address.",
94-
);
95-
}
9696
const saltHex =
9797
accountSalt && isHex(accountSalt)
9898
? accountSalt

0 commit comments

Comments
 (0)