1

I am using uniswap swap functions on web3 and I wanted to accept the transaction directly on code without using the pop up prompt on metamask. Is there a way to do this? or other alternative/workaround to make it possible?

1 Answer 1

2

You can always create a custom client-side wallet in JavaScript/HTML/web3.js that holds the private key in localStorage to make the transactions, separate from the private key from MetaMask.

Then you ask users to transfer assets to this wallet.

However, the practice is not encouraged, as it is unsafe. EtherDelta had such functionality. They got hacked in 2017 and users having their private keys on the website wallet lost their assets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.