BitBoxSwiss / bitbox-wallet-app

The BitBoxApp for desktop and mobile.
https://bitbox.swiss/app
Apache License 2.0
251 stars 82 forks source link

frontend/feetargets: load fee targets only once #2730

Closed benma closed 3 months ago

benma commented 3 months ago

Due to the useEffect fetching the fee targets depending on config, it was executed many times when going to the send screen, while it should only be called once. This commit fixes this.

While not strictly necessary, I also moved the fee target fetching its own useLoad(), which should decrease the chance that we will accidentally increase the number of requests again.