Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signTransaction mutates the given transaction #4789

Closed
KillariDev opened this issue Jul 19, 2024 · 2 comments
Closed

signTransaction mutates the given transaction #4789

KillariDev opened this issue Jul 19, 2024 · 2 comments
Assignees
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@KillariDev
Copy link

KillariDev commented Jul 19, 2024

Ethers Version

6.13.1

Search Terms

No response

Describe the Problem

when signTransaction is given a transaction object, it mutates the object by removing from field

Code Snippet

const test = async () => {
	const wallet = new ethers.Wallet('0x0000000000000000000000000000000000000000000000000000000000000001', new JsonRpcProvider('https://holesky.drpc.org'))
	const tx = { from: '0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf' }
	await wallet.populateTransaction(tx)
	console.log(tx.from)
	await wallet.signTransaction(tx)
	console.log(tx.from)
}
test()

this prints:

0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
undefined

It should print:

0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
@KillariDev KillariDev added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Jul 19, 2024
@ricmoo ricmoo added bug Verified to be an issue. and removed investigate Under investigation and may be a bug. labels Jul 25, 2024
@ricmoo
Copy link
Member

ricmoo commented Jul 25, 2024

Confirmed this is a bug. Looking into it now.

@ricmoo
Copy link
Member

ricmoo commented Jul 25, 2024

Fixed in v6.13.2. Please give it a try and let me know if there are any more issues.

Thanks!: )

@ricmoo ricmoo closed this as completed Aug 31, 2024
@ricmoo ricmoo added the fixed/complete This Bug is fixed or Enhancement is complete and published. label Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants