Skip to content

Commit 9bf17fa

Browse files
committedApr 29, 2022
Fixed decimal strings as value-type properties for JsonRpcSigner (#2948).

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/providers/src.ts/json-rpc-provider.ts

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

0 commit comments

Comments
 (0)
Please sign in to comment.