From 5e89da416ff4e9f1643ff6bb4e402f5d013c0e7d Mon Sep 17 00:00:00 2001 From: Ayanami Date: Fri, 11 Mar 2022 12:55:52 +0900 Subject: [PATCH] Check senderAccount for withdrawal using private key --- cli.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cli.js b/cli.js index 0a047e6..c78b8be 100755 --- a/cli.js +++ b/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');