Closed ok300 closed 2 months ago
transaction.refunded
is only part of ReverseSwap
. Thats where boltz does the lockup transaction.
Client does the lockup for SubmarineSwap
and potentially needs to refund it. The final states for submarine are invoice.failedToPay
and swap.expired
It is not part of the enum.
When Boltz returns the swap state as transaction.refunded
, fetching the swap state via boltz-rust
results in a parsing error on the client side.
Turns out you're right, the enum RevSwapStates::TransactionRefunded
covers that state.
We were using the wrong enum SubSwapStates
which doesn't reflect that state.
The swap state
transaction.refunded
is not covered by theSubSwapStates
enum:https://github.com/SatoshiPortal/boltz-rust/blob/cf2544ae126ac46ab2118313d61a57f160e3d64e/src/swaps/boltz.rs#L332-L340
According to the Boltz docs^1:
This leads to a parsing error when parsing the state of a swap with this status.