@@ -183,6 +183,7 @@ export const getSDK = async (
183183 }
184184
185185 const wallet = getAwsKmsWallet ( { awsKmsKeyId } ) ;
186+ // Note: if wallet has a chain, it will get used instead of chain specified here
186187 sdk = await ThirdwebSDK . fromWallet ( wallet , chain , {
187188 secretKey : THIRDWEB_API_SECRET_KEY ,
188189 supportedChains : RPC_OVERRIDES ,
@@ -198,14 +199,16 @@ export const getSDK = async (
198199 }
199200
200201 const signer = getGcpKmsSigner ( { gcpKmsKeyId, gcpKmsKeyVersionId } ) ;
202+ // Note: if signer has a chain, it will get used instead of chain specified here
201203 sdk = ThirdwebSDK . fromSigner ( signer , chain , {
202204 secretKey : THIRDWEB_API_SECRET_KEY ,
203205 supportedChains : RPC_OVERRIDES ,
204206 } ) ;
205207 cacheSdk ( chain . name , sdk , walletAddress ) ;
206208 return sdk ;
207209 } else if ( walletType === WalletType . local ) {
208- const wallet = await getLocalWallet ( { walletAddress } ) ;
210+ const wallet = await getLocalWallet ( { chain, walletAddress } ) ;
211+ // Note: chain doesn't actually get respected here, comes from wallet
209212 sdk = await ThirdwebSDK . fromWallet ( wallet , chain , {
210213 secretKey : THIRDWEB_API_SECRET_KEY ,
211214 supportedChains : RPC_OVERRIDES ,
0 commit comments