Skip to content

Commit

Permalink
Prevent mutating transactions when signing (#4789).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jul 25, 2024
1 parent fc66b8a commit 1a51af8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src.ts/wallet/base-wallet.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getAddress, resolveAddress } from "../address/index.js";
import { hashMessage, TypedDataEncoder } from "../hash/index.js";
import { AbstractSigner } from "../providers/index.js";
import { AbstractSigner, copyRequest } from "../providers/index.js";

This comment has been minimized.

Copy link
@coolblack600

coolblack600 Aug 28, 2024

Thank you

import { computeAddress, Transaction } from "../transaction/index.js";
import {
defineProperties, resolveProperties, assert, assertArgument
Expand Down Expand Up @@ -69,6 +69,7 @@ export class BaseWallet extends AbstractSigner {
}

async signTransaction(tx: TransactionRequest): Promise<string> {
tx = copyRequest(tx);

This comment has been minimized.

Copy link
@coolblack600

coolblack600 Aug 28, 2024

👍


// Replace any Addressable or ENS name with an address
const { to, from } = await resolveProperties({
Expand Down

0 comments on commit 1a51af8

Please # to comment.