Skip to content

Commit

Permalink
added chainId to _prepareTransactionParams (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-zhang-sv committed Oct 30, 2023
1 parent ecdbc49 commit 9f2964e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ export class CoinbaseWalletProvider extends EventEmitter implements Web3Provider
value?: unknown;
data?: unknown;
nonce?: unknown;
chainId?: unknown;
}): EthereumTransactionParams {
const fromAddress = tx.from ? ensureAddressString(tx.from) : this.selectedAddress;
if (!fromAddress) {
Expand All @@ -903,7 +904,7 @@ export class CoinbaseWalletProvider extends EventEmitter implements Web3Provider
const maxPriorityFeePerGas =
tx.maxPriorityFeePerGas != null ? ensureBN(tx.maxPriorityFeePerGas) : null;
const gasLimit = tx.gas != null ? ensureBN(tx.gas) : null;
const chainId = this.getChainId();
const chainId = tx.chainId ? ensureIntNumber(tx.chainId) : this.getChainId();

return {
fromAddress,
Expand Down

0 comments on commit 9f2964e

Please sign in to comment.