Skip to content

Commit bbbcae7

Browse files
committed
fix(wallet): persist payment_proof when transitioning melt quote state
The wallet's update_melt_quote_state() was receiving the payment_proof parameter and forwarding it to add_transaction_for_pending_melt() but never writing it to the persisted quote record. As a result, the proof (lightning preimage / onchain outpoint) was never visible on the quote itself after a successful melt, only in the transaction log. Assign payment_proof to quote.payment_proof before persistence, and carry it through the ConcurrentUpdate retry path.
1 parent 80e6352 commit bbbcae7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • crates/cdk/src/wallet/melt

crates/cdk/src/wallet/melt/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@ impl Wallet {
964964
}
965965

966966
quote.state = new_state;
967+
quote.payment_proof = payment_proof;
967968

968969
match self.localstore.add_melt_quote(quote.clone()).await {
969970
Ok(_) => Ok(()),
@@ -980,6 +981,7 @@ impl Wallet {
980981
.ok_or(Error::UnknownQuote)?;
981982

982983
fresh_quote.state = new_state;
984+
fresh_quote.payment_proof = quote.payment_proof.clone();
983985

984986
match self.localstore.add_melt_quote(fresh_quote.clone()).await {
985987
Ok(_) => (),

0 commit comments

Comments
 (0)