Monday icon indicating copy to clipboard operation
Monday copied to clipboard

Fix: After sending onchain payment the balance doesn’t refresh immediately

Open reez opened this issue 9 months ago • 4 comments

Reproduce:

  • sent onchain payment and tapped “Done” to go back to main screen, but then the on-chain balance did not update to reflect that sent transaction
  • i killed the app and then opened it and the on-chain balance reflected the transaction

This may be something onchain specific w LDK Node, I don’t believe this happens with lightning.

reez avatar Mar 23 '25 22:03 reez

Good catch. Agree most likely it's something to do with delayed node update. We could perhaps force one manually by getting .balances

danielnordh avatar Mar 24 '25 12:03 danielnordh

My possibly incorrect remembering of how LDK Node handles onchain is that it checks every minute for a new balance, so in Monday when that check happens it will then update the onchain balance. But that check doesn't happen immediately after a payment, so the user will wait until that check happens to see the onchain balance refreshed.

I think I remember seeing this because that's why I used to have the time when it was last refreshed (via LDK Node api) under the balance, so I could visually see the time it was last refreshed.

This is my vague and old recollection of things though, could be completely off base, and just adding it here in case it helps explain this, but also more importantly need to dig in to see what the exact behavior is on LDK Node side.

reez avatar Mar 24 '25 16:03 reez

https://github.com/lightningdevkit/ldk-node/blob/main/src/config.rs#L27 I think its 80 seconds actually ?

reez avatar Jul 14 '25 17:07 reez

opened a pr #222 to try to address this

reez avatar Jul 14 '25 17:07 reez