anastasis-gtk

Demonstrator GUI for Anastasis
Log | Files | Refs | README | LICENSE

commit 5edd2bb88adfbee9ddf6dc448f1ac92441e36660
parent 8604c1924043d31d34ff6445e8cd318e723f1632
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 30 Jul 2026 11:12:03 +0200

fix payment

Diffstat:
Msrc/anastasis/anastasis-gtk_action.c | 22+++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/anastasis/anastasis-gtk_action.c b/src/anastasis/anastasis-gtk_action.c @@ -2699,12 +2699,8 @@ action_challenge_paying (void) const char *payto = NULL; const char *provider = NULL; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_string ("state", - &state), - GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ("taler_pay_uri", - &payto), - NULL), + GNUNET_JSON_spec_string ("taler_pay_uri", + &payto), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_string ("provider", &provider), @@ -2714,6 +2710,15 @@ action_challenge_paying (void) GNUNET_JSON_spec_end () }; + /* The state must be tested before the payment details are parsed: the + other feedback states have no payment secret, and the reducer calls + this one "taler-payment" (it was "payment" before Anastasis v0.3.0). */ + state = json_string_value (json_object_get (ppr, + "state")); + if ( (NULL == state) || + (0 != strcmp (state, + "taler-payment")) ) + continue; /* this challenge does not want to be paid for */ if (GNUNET_OK != GNUNET_JSON_parse (ppr, spec, @@ -2725,11 +2730,6 @@ action_challenge_paying (void) JSON_INDENT (2)); continue; } - if (NULL == payto) - continue; - if (0 != strcmp (state, - "payment")) - continue; found = true; add_qrcode (payto, (NULL != provider) ? provider : "");