@@ -169,14 +169,14 @@ class TokenboundClient {
169169 * @returns The tokenbound account address.
170170 */
171171 public getAccount ( params : GetAccountParams ) : `0x${string } ` {
172- const { tokenContract, tokenId, salt = 0 } = params
172+ const { tokenContract, tokenId, salt = 0 , chainId = this . chainId } = params
173173
174174 try {
175175 const getAcct = this . supportsV3 ? getTokenboundV3Account : computeAccount
176176 return getAcct (
177177 tokenContract ,
178178 tokenId ,
179- this . chainId ,
179+ chainId ,
180180 this . implementationAddress ,
181181 this . registryAddress ,
182182 salt
@@ -200,14 +200,14 @@ class TokenboundClient {
200200 data : `0x${string } `
201201 }
202202 > {
203- const { tokenContract, tokenId, salt = 0 , appendedCalls = [ ] } = params
203+ const { tokenContract, tokenId, salt = 0 , chainId = this . chainId , appendedCalls = [ ] } = params
204204
205205 const getAcct = this . supportsV3 ? getTokenboundV3Account : computeAccount
206206
207207 const computedAcct = getAcct (
208208 tokenContract ,
209209 tokenId ,
210- this . chainId ,
210+ chainId ,
211211 this . implementationAddress ,
212212 this . registryAddress ,
213213 salt
@@ -225,7 +225,7 @@ class TokenboundClient {
225225 const preparedBasicCreateAccount = await prepareBasicCreateAccount (
226226 tokenContract ,
227227 tokenId ,
228- this . chainId ,
228+ chainId ,
229229 this . implementationAddress ,
230230 this . registryAddress ,
231231 salt
@@ -283,7 +283,7 @@ class TokenboundClient {
283283 public async createAccount (
284284 params : CreateAccountParams
285285 ) : Promise < { account : `0x${string } `; txHash : `0x${string } ` } > {
286- const { tokenContract, tokenId, salt = 0 , appendedCalls = [ ] } = params
286+ const { tokenContract, tokenId, salt = 0 , chainId = this . chainId , appendedCalls = [ ] } = params
287287
288288 try {
289289 let txHash : `0x${string } ` | undefined
@@ -293,7 +293,7 @@ class TokenboundClient {
293293 const computedAcct = getAcct (
294294 tokenContract ,
295295 tokenId ,
296- this . chainId ,
296+ chainId ,
297297 this . implementationAddress ,
298298 this . registryAddress ,
299299 salt
@@ -302,6 +302,7 @@ class TokenboundClient {
302302 const preparedCreateAccount = await this . prepareCreateAccount ( {
303303 tokenContract,
304304 tokenId,
305+ chainId,
305306 salt,
306307 appendedCalls,
307308 } )
@@ -323,7 +324,8 @@ class TokenboundClient {
323324 this . walletClient ,
324325 this . implementationAddress ,
325326 this . registryAddress ,
326- salt
327+ salt ,
328+ chainId
327329 )
328330 }
329331
0 commit comments