mirror of
https://github.com/tornadocash/tornado-cli.git
synced 2025-06-05 05:19:48 -04:00
Check senderAccount for withdrawal using private key
This commit is contained in:
parent
b7931adaa4
commit
5e89da416f
1 changed files with 1 additions and 0 deletions
1
cli.js
1
cli.js
|
@ -469,6 +469,7 @@ async function withdraw({ deposit, currency, amount, recipient, relayerURL, refu
|
|||
}
|
||||
} else {
|
||||
// using private key
|
||||
assert(senderAccount, 'Private Key should be supplied through .env file if you want to make withdrawal without relayers');
|
||||
|
||||
// check if the address of recepient matches with the account of provided private key from environment to prevent accidental use of deposit address for withdrawal transaction.
|
||||
assert(recipient.toLowerCase() == senderAccount.toLowerCase(), 'Withdrawal recepient mismatches with the account of provided private key from environment file');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue