LtbLightning / bdk-rn

Bitcoin Development Kit - React Native Module
MIT License
50 stars 15 forks source link

`wallet.sync()` is blocking execution on android #45

Closed Czino closed 1 year ago

Czino commented 1 year ago

Combined with issue https://github.com/LtbLightning/bdk-rn/issues/44, this becomes quickly problematic.

Performing a wallet.sync() on app init result in at least 10 seconds waiting time.

Any other wallet.sync() during the session makes the app unresponsive

BitcoinZavior commented 1 year ago

@Czino I will have a different approach for this shortly to avoid the UI thread from being blocked.

BitcoinZavior commented 1 year ago

@Czino Please check these changes https://github.com/LtbLightning/bdk-rn/pull/48 Execution is not blocked anymore using this approach. I am not sure about the UI but code execution doesn't wait for the sync process to complete.