Skip to content

Commit

Permalink
Preserve explicit chainId in JsonRpcProvider during transaction seria…
Browse files Browse the repository at this point in the history
…lization (#2691).
  • Loading branch information
ricmoo committed Feb 22, 2022
1 parent 5f26fd5 commit 6807a76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/providers/src.ts/json-rpc-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ export class JsonRpcProvider extends BaseProvider {

This comment has been minimized.

Copy link
@Dezanimanikhrisloveachother
const result: { [key: string]: string | AccessList } = {};

// Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros.
["gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function(key) {
// JSON-RPC now requires numeric values to be "quantity" values

This comment has been minimized.

Copy link
@Dezanimanikhrisloveachother

Dezanimanikhrisloveachother Dec 23, 2023

["chainId", "gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function(key) {
if ((<any>transaction)[key] == null) { return; }
const value = hexValue((<any>transaction)[key]);
if (key === "gasLimit") { key = "gas"; }
Expand Down

0 comments on commit 6807a76

Please sign in to comment.