breez / breez-sdk-liquid

MIT License
18 stars 4 forks source link

Pause events during first `sync` #300

Closed ok300 closed 2 months ago

ok300 commented 4 months ago

The first call to sync on a new setup with some pre-existing onchain history will cause a wave of LiquidSdkEvent::PaymentSucceed events.

This is because the newly discovered items in the wallet's history are indistinguishable from actual new Send / Receive direct payments.

One solution is to pause events for the duration of the first sync, and particularly sync_payments_with_chain_data.

dangeross commented 3 months ago

This seems to happen for pending payments also, on each sync the pending event is emitted