From 2c0e704c82346c3da665ce4bbaba52c21bf266df Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 2 Jul 2018 17:40:17 -0700 Subject: [PATCH] Confirm the payment --- multinode-demo/test/wallet-sanity.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/multinode-demo/test/wallet-sanity.sh b/multinode-demo/test/wallet-sanity.sh index 6b8577ccd6..5834558eef 100755 --- a/multinode-demo/test/wallet-sanity.sh +++ b/multinode-demo/test/wallet-sanity.sh @@ -21,14 +21,23 @@ check_balance_output() { fi } -# Ensure a fresh client configuration every time +pay_and_confirm() { + exec 42>&1 + signature=$($wallet pay "$@" | tee >(cat - >&42)) + $wallet confirm "$signature" +} + $wallet reset $wallet address check_balance_output "No account found! Request an airdrop to get started" -$wallet airdrop --tokens 100 -check_balance_output "Your balance is: 100" -$wallet pay --to $garbage_address --tokens 100 +$wallet airdrop check_balance_output "Your balance is: 0" +$wallet airdrop --tokens 60 +check_balance_output "Your balance is: 60" +$wallet airdrop --tokens 40 +check_balance_output "Your balance is: 100" +pay_and_confirm --to $garbage_address --tokens 99 +check_balance_output "Your balance is: 1" echo PASS exit 0