File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
packages/wallets/src/evm/connectors/smart-wallet Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @thirdweb-dev/wallets " : patch
3
+ ---
4
+
5
+ Expose data param for smart wallet util functions
Original file line number Diff line number Diff line change 3
3
isContractDeployed ,
4
4
ThirdwebSDK ,
5
5
} from "@thirdweb-dev/sdk" ;
6
+ import { BytesLike } from "ethers" ;
6
7
7
8
export type AccessibleSmartWallets = {
8
9
owned : string ;
@@ -81,12 +82,13 @@ export async function isSmartWalletDeployed(
81
82
chain : ChainOrRpcUrl ,
82
83
factoryAddress : string ,
83
84
personalWalletAddress : string ,
85
+ data : BytesLike = "0x" ,
84
86
) {
85
87
const readOnlySDK = getSDK ( chain ) ;
86
88
const factoryContract = await readOnlySDK . getContract ( factoryAddress ) ;
87
89
const accountAddress = await factoryContract . call ( "getAddress" , [
88
90
personalWalletAddress ,
89
- "0x" ,
91
+ data ,
90
92
] ) ;
91
93
const isDeployed = await isContractDeployed (
92
94
accountAddress ,
@@ -106,12 +108,13 @@ export async function getSmartWalletAddress(
106
108
chain : ChainOrRpcUrl ,
107
109
factoryAddress : string ,
108
110
personalWalletAddress : string ,
111
+ data : BytesLike = "0x" ,
109
112
) : Promise < string > {
110
113
const readOnlySDK = getSDK ( chain ) ;
111
114
const factoryContract = await readOnlySDK . getContract ( factoryAddress ) ;
112
115
const accountAddress = await factoryContract . call ( "getAddress" , [
113
116
personalWalletAddress ,
114
- "0x" ,
117
+ data ,
115
118
] ) ;
116
119
return accountAddress ;
117
120
}
You can’t perform that action at this time.
0 commit comments