@@ -183,6 +183,7 @@ export const getSDK = async (
183
183
}
184
184
185
185
const wallet = getAwsKmsWallet ( { awsKmsKeyId } ) ;
186
+ // Note: if wallet has a chain, it will get used instead of chain specified here
186
187
sdk = await ThirdwebSDK . fromWallet ( wallet , chain , {
187
188
secretKey : THIRDWEB_API_SECRET_KEY ,
188
189
supportedChains : RPC_OVERRIDES ,
@@ -198,14 +199,16 @@ export const getSDK = async (
198
199
}
199
200
200
201
const signer = getGcpKmsSigner ( { gcpKmsKeyId, gcpKmsKeyVersionId } ) ;
202
+ // Note: if signer has a chain, it will get used instead of chain specified here
201
203
sdk = ThirdwebSDK . fromSigner ( signer , chain , {
202
204
secretKey : THIRDWEB_API_SECRET_KEY ,
203
205
supportedChains : RPC_OVERRIDES ,
204
206
} ) ;
205
207
cacheSdk ( chain . name , sdk , walletAddress ) ;
206
208
return sdk ;
207
209
} 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
209
212
sdk = await ThirdwebSDK . fromWallet ( wallet , chain , {
210
213
secretKey : THIRDWEB_API_SECRET_KEY ,
211
214
supportedChains : RPC_OVERRIDES ,
0 commit comments