View Issue Details

IDProjectCategoryView StatusLast Update
0011129Talermerchant backendpublic2026-02-21 02:23
ReporterWindfisch Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0011129: Merchant backend PATCH to /instances/foo/private does not update default_refund_delay when changed alone
DescriptionWhen PATCHing the aforementioned endpoint and only modifying default_refund_delay, the change is not reflected in a subsequent GET.
If, however, default_wire_transfer_delay or default_pay_delay are changed too, then the default_refund_change is reflected in the subsequent GET.

apparently there is some missing update. i couldn't find it with my grep-fu, however.
what i did find is an apparent bug in src/backenddb/test_merchantdb.c's function check_instances_equal, which checks for default_{wire_transfer,pay}_delay but fails to check for default_refund_delay. This is exactly the kind of bug i was looking for as it could explain how such an update is missed; however, a "test_whatever" file does not seem like it would affect actual runtime behavior. :/
Steps To Reproducecreate stonks2 instance. install jq.

repeat the following line with different variable settings.

WIRE=60; PAY=60; REFUND=30; curl 'https://backend.w.icmp.camp/instances/stonks2/private' -X PATCH -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Bearer secret-token:REDACTED' --data-raw '{"default_pay_delay":{"d_us":'$PAY'000000},"default_refund_delay":{"d_us":'$REFUND'000000},"default_wire_transfer_delay":{"d_us":'$WIRE'000000},"use_stefan":false,"name":"stonks2","email_validated":false,"phone_validated":false,"merchant_pub":"GE04TYN95S5CWNBBN3GWK3W2SM0WKRBSQ6X3A4MPT4KQ02JD4A40","address":{},"jurisdiction":{},"default_wire_transfer_rounding_interval":"NONE","auth":{"method":"token"}}' && curl 'https://backend.w.icmp.camp/instances/stonks2/private' --compressed -H 'Accept: application/json' -H 'Authorization: Bearer secret-token:EYADCF1E372W34G3CZ36EQJNPTPQA7PM9AQX8V6B7W8CXVENT8ZG' | jq '{"wire": .default_wire_transfer_delay.d_us/1000000, "pay": .default_pay_delay.d_us/1000000, "refund": .default_refund_delay.d_us/1000000}'

results in 60/60/30

call with WIRE=60; PAY=60; REFUND=31 -> results in 60/60/30. the change is not reflected.
call with WIRE=60; PAY=61; REFUND=31 -> results in 60/61/31. now it works
call with WIRE=60; PAY=60; REFUND=31 -> results in 60/60/31. proves that this is not an invalid combination which was silently rejected


TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-02-21 02:23 Windfisch New Issue