diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-01-06 15:32:56 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-01-06 15:32:56 +0100 |
commit | ced8baa6d7097367e29d30127d55e90ad3e705c4 (patch) | |
tree | 1af23d36140b529ea7c242b0730d23044f2dd7d1 /src/backend | |
parent | f9647f4f000556909ec1f5b5c3e6872fe2453647 (diff) | |
download | merchant-ced8baa6d7097367e29d30127d55e90ad3e705c4.tar.gz merchant-ced8baa6d7097367e29d30127d55e90ad3e705c4.tar.bz2 merchant-ced8baa6d7097367e29d30127d55e90ad3e705c4.zip |
DB schema changes for pg_lookup_pending_deposits.c
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/.gitignore | 1 | ||||
-rw-r--r-- | src/backend/taler-merchant-depositcheck.c | 19 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/backend/.gitignore b/src/backend/.gitignore index 62ef6e0a..69cbfcee 100644 --- a/src/backend/.gitignore +++ b/src/backend/.gitignore @@ -1,3 +1,4 @@ taler-merchant-webhook taler-merchant-wirewatch taler-merchant-exchange +taler-merchant-depositcheck diff --git a/src/backend/taler-merchant-depositcheck.c b/src/backend/taler-merchant-depositcheck.c index 4364c9f5..e130da9e 100644 --- a/src/backend/taler-merchant-depositcheck.c +++ b/src/backend/taler-merchant-depositcheck.c @@ -379,7 +379,7 @@ run_at (struct GNUNET_TIME_Absolute deadline) /** * Function called with detailed wire transfer data. * - * @param cls closure with a `struct TransferQuery *` + * @param cls closure with a `struct ExchangeInteraction *` * @param dr HTTP response data */ static void @@ -400,6 +400,7 @@ deposit_get_cb (void *cls, TALER_B2S (&w->coin_pub)); // FIXME: this must filter this particular entry from the // select below for good! + // => need to update 'merchant_deposit_confirmations.wire_pending'! qs = db_plugin->insert_deposit_to_transfer (db_plugin->cls, w->deposit_serial, &dr->details.ok); @@ -424,9 +425,6 @@ deposit_get_cb (void *cls, dr->details.accepted.aml_decision, TALER_B2S (&w->coin_pub)); now = GNUNET_TIME_timestamp_get (); - // FIXME: this must filter this particular entry from the - // select below, at least until the KYC/AML request is - // satisfied; how will we learn that? qs = db_plugin->account_kyc_set_status ( db_plugin->cls, w->instance_id, @@ -444,6 +442,12 @@ deposit_get_cb (void *cls, GNUNET_SCHEDULER_shutdown (); return; } + // FIXME: if kyc_ok and 0==aml_decision, we + // should bump the deposit_deadline in the + // merchant_deposit_confirmations table just + // to avoid running the exact same query immediately + // again (in case there is an issue at the exchange) + // => update also 'exchange_failure'! break; } default: @@ -452,7 +456,12 @@ deposit_get_cb (void *cls, "Exchange %s returned tracking failure for deposited coin %s\n", exchange_url, TALER_B2S (&w->coin_pub)); - /* FIXME: how to handle? */ + // FIXME: + // We should bump the deposit_deadline in the + // merchant_deposit_confirmations table just + // to avoid running the exact same query immediately + // again (in case there is an issue at the exchange) + // => update also 'exchange_failure'! return; } } /* end switch */ |