Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing ChainId in SendTx #1043

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -379,10 +379,10 @@
/** @deprecated Use `.request(...)` instead. */
public send(request: JSONRPCRequest): JSONRPCResponse;
public send(request: JSONRPCRequest[]): JSONRPCResponse[];
public send(request: JSONRPCRequest, callback: Callback<JSONRPCResponse>): void;

Check warning on line 382 in packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts

View workflow job for this annotation

GitHub Actions / Lint Check

Unexpected any. Specify a different type

Check warning on line 382 in packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts

View workflow job for this annotation

GitHub Actions / Lint Check

Unexpected any. Specify a different type

Check warning on line 382 in packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts

View workflow job for this annotation

GitHub Actions / Lint Check

Unexpected any. Specify a different type

Check warning on line 382 in packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts

View workflow job for this annotation

GitHub Actions / Lint Check

Unexpected any. Specify a different type

Check warning on line 382 in packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts

View workflow job for this annotation

GitHub Actions / Lint Check

Unexpected any. Specify a different type

Check warning on line 382 in packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts

View workflow job for this annotation

GitHub Actions / Lint Check

Unexpected any. Specify a different type
public send(request: JSONRPCRequest[], callback: Callback<JSONRPCResponse[]>): void;
public send<T = any>(method: string, params?: any[] | any): Promise<T>;
public send(

Check warning on line 385 in packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts

View workflow job for this annotation

GitHub Actions / Lint Check

Unexpected any. Specify a different type

Check warning on line 385 in packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts

View workflow job for this annotation

GitHub Actions / Lint Check

Unexpected any. Specify a different type
requestOrMethod: JSONRPCRequest | JSONRPCRequest[] | string,
callbackOrParams?: Callback<JSONRPCResponse> | Callback<JSONRPCResponse[]> | any[] | any
): JSONRPCResponse | JSONRPCResponse[] | void | Promise<any> {
Expand Down Expand Up @@ -886,6 +886,7 @@
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 @@
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
Loading