pull down to refresh
140 sats \ 3 replies \ @south_korea_ln 5 May \ parent \ on: Zapback / Last Pay Wins for Friends gaming
Yeah, I remember lastpaywins had something similar going on where timers would not sync between tabs... @alex_lewin resolved it somehow, but don't know how.
payment notifications are emitted via websocket that contain a timestamp of the payment. then the browser calculates how much time is left based on its own clock
reply
Ohh, thank you, that would also fix my issue probably:
I currently fetch the timestamp when the invoice will expire once and then I let the browser count down the seconds.
But instead, I should let the browser calculate the difference between now and the expiration timestamp every second. Then there would be no clock drift, for example if the browser doesn't run the JS interval every second for whatever—probably good—reason.
reply
See @Undisciplined, we have a real OG here
reply