mirror of
https://github.com/tornadocash/tornado-cli.git
synced 2024-12-18 12:34:27 -05:00
Check senderAccount for withdrawal using private key
This commit is contained in:
parent
b7931adaa4
commit
5e89da416f
1
cli.js
1
cli.js
@ -469,6 +469,7 @@ async function withdraw({ deposit, currency, amount, recipient, relayerURL, refu
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// using private key
|
// 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.
|
// 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');
|
assert(recipient.toLowerCase() == senderAccount.toLowerCase(), 'Withdrawal recepient mismatches with the account of provided private key from environment file');
|
||||||
|
Loading…
Reference in New Issue
Block a user