-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
b0307a8
to
d0ccadb
Compare
@@ -350,6 +351,11 @@ where | |||
}) | |||
.await? | |||
} | |||
|
|||
pub async fn sync_wallet(&self) -> Result<()> { | |||
self.wallet_actor.send(wallet::Sync).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is, that this is a blocking send
that we await so the UI gets feedback if the sync is done.
Not sure how the routes will behave if a user triggers some other actions while waiting for the wallet to sync, but I don't think it matters much.
I was thinking if it would make sense to make this send_async
, but I don't think we can easily achieve this in a good way, and while the wallet is syncing we should not really trigger actions anyway. So I think this is fine :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tried it: it's not blocking, you can go out of the wallet. I was able to open a position but I think the sync was already done by that time :)
bors r+ |
Merge conflict. |
Allows us to see when sync is being started
We don't have it in the frontend so no need to have the endpoint exported.
Now that we can trigger the wallet sync manually through the UI we can sync less often. This - reduces load from ourselves because syncing is a long running process - reduces load from the infrastructure we are using For now we sync every 3 minutes. This has been chosen because 2 is an impossible number: https://wiki.c2.com/?TwoIsAnImpossibleNumber
d0ccadb
to
867915a
Compare
bors r+ |
2172: Minor wallet improvements r=bonomat a=bonomat Fixes #2158 Minor UI change: Maker UI: <img width="486" alt="image" src="https://user-images.githubusercontent.com/224613/172093037-b1dfc492-9789-4524-a781-afc77c9de069.png"> Taker UI: <img width="750" alt="image" src="https://user-images.githubusercontent.com/224613/172093106-79a31577-4d09-4e33-9dbb-e2f3a51d3a08.png"> While syncing: <img width="803" alt="image" src="https://user-images.githubusercontent.com/224613/172093127-a58e6f27-44f9-499d-866b-55dcfa2243f6.png"> Co-authored-by: Philipp Hoenisch <[email protected]>
Build failed: |
bors retry |
2172: Minor wallet improvements r=bonomat a=bonomat Fixes #2158 Minor UI change: Maker UI: <img width="486" alt="image" src="https://user-images.githubusercontent.com/224613/172093037-b1dfc492-9789-4524-a781-afc77c9de069.png"> Taker UI: <img width="750" alt="image" src="https://user-images.githubusercontent.com/224613/172093106-79a31577-4d09-4e33-9dbb-e2f3a51d3a08.png"> While syncing: <img width="803" alt="image" src="https://user-images.githubusercontent.com/224613/172093127-a58e6f27-44f9-499d-866b-55dcfa2243f6.png"> Co-authored-by: Philipp Hoenisch <[email protected]>
Build failed: |
bors r+ |
Fixes #2158
Minor UI change:
Maker UI:

Taker UI:
While syncing: