Preserve explicit chainId in JsonRpcProvider during transaction serialization (#2691).
This commit is contained in:
parent
5f26fd55c9
commit
6807a76b8d
@ -640,8 +640,8 @@ export class JsonRpcProvider extends BaseProvider {
|
|||||||
|
|
||||||
const result: { [key: string]: string | AccessList } = {};
|
const result: { [key: string]: string | AccessList } = {};
|
||||||
|
|
||||||
// Some nodes (INFURA ropsten; INFURA mainnet is fine) do not like leading zeros.
|
// JSON-RPC now requires numeric values to be "quantity" values
|
||||||
["gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function(key) {
|
["chainId", "gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function(key) {
|
||||||
if ((<any>transaction)[key] == null) { return; }
|
if ((<any>transaction)[key] == null) { return; }
|
||||||
const value = hexValue((<any>transaction)[key]);
|
const value = hexValue((<any>transaction)[key]);
|
||||||
if (key === "gasLimit") { key = "gas"; }
|
if (key === "gasLimit") { key = "gas"; }
|
||||||
|
Loading…
Reference in New Issue
Block a user