summaryrefslogtreecommitdiff
path: root/src/mint-lib/test_mint_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint-lib/test_mint_api.c')
-rw-r--r--src/mint-lib/test_mint_api.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c
index 97e2eb8f0..1e7246000 100644
--- a/src/mint-lib/test_mint_api.c
+++ b/src/mint-lib/test_mint_api.c
@@ -166,6 +166,11 @@ struct Command
*/
struct TALER_CoinSpendPrivateKeyP coin_priv;
+ /**
+ * Withdraw handle (while operation is running).
+ */
+ struct TALER_MINT_WithdrawSignHandle *wsh;
+
} withdraw_sign;
struct
@@ -209,6 +214,11 @@ struct Command
*/
struct TALER_MerchantPublicKeyP merchant_priv;
+ /**
+ * Deposit handle while operation is running.
+ */
+ struct TALER_MINT_DepositHandle *dh;
+
} deposit;
} details;
@@ -495,10 +505,26 @@ do_shutdown (void *cls,
}
break;
case OC_WITHDRAW_SIGN:
- GNUNET_break (0); // not implemented
+ if (NULL != cmd->details.withdraw_sign.wsh)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Command %u (%s) did not complete\n",
+ i,
+ cmd->label);
+ TALER_MINT_withdraw_sign_cancel (cmd->details.withdraw_sign.wsh);
+ cmd->details.withdraw_sign.wsh = NULL;
+ }
break;
case OC_DEPOSIT:
- GNUNET_break (0); // not implemented
+ if (NULL != cmd->details.deposit.dh)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Command %u (%s) did not complete\n",
+ i,
+ cmd->label);
+ TALER_MINT_deposit_cancel (cmd->details.deposit.dh);
+ cmd->details.deposit.dh = NULL;
+ }
break;
default:
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,