From 0f70b58c78ffee10f8257f9488753f977f03d20d Mon Sep 17 00:00:00 2001 From: Theo Date: Fri, 19 May 2023 22:04:53 +0300 Subject: [PATCH] Prettify 'compliance' command output: now deposit and withdrawal events load before compliance info printing --- cli.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli.js b/cli.js index 8812a1f..a3281b1 100755 --- a/cli.js +++ b/cli.js @@ -1627,7 +1627,10 @@ async function main() { const { currency, amount, netId, deposit } = parseNote(noteString); await init({ rpc: program.rpc, noteNetId: netId, currency, amount }); + const depositInfo = await loadDepositData({ amount, currency, deposit }); + const withdrawInfo = await loadWithdrawalData({ amount, currency, deposit }); + const depositDate = new Date(depositInfo.timestamp * 1000); console.log('\n=============Deposit================='); console.log('Deposit :', amount, currency.toUpperCase()); @@ -1641,7 +1644,7 @@ async function main() { return; } console.log('=====================================', '\n'); - const withdrawInfo = await loadWithdrawalData({ amount, currency, deposit }); + const withdrawalDate = new Date(withdrawInfo.timestamp * 1000); console.log('\n=============Withdrawal=============='); console.log('Withdrawal :', withdrawInfo.amount, currency);