Fixed decimal strings as value-type properties for JsonRpcSigner (#2948).

This commit is contained in:
Richard Moore 2022-04-29 14:56:10 -04:00
parent 66d6aaf4b4
commit 9bf17fa07c

@ -671,7 +671,7 @@ export class JsonRpcProvider extends BaseProvider {
// JSON-RPC now requires numeric values to be "quantity" values
["chainId", "gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function(key) {
if ((<any>transaction)[key] == null) { return; }
const value = hexValue((<any>transaction)[key]);
const value = hexValue(BigNumber.from((<any>transaction)[key]));
if (key === "gasLimit") { key = "gas"; }
result[key] = value;
});