-
Notifications
You must be signed in to change notification settings - Fork 28
feat: OrangeFren client #641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Maksim Kirillov <[email protected]>
|
|
||
| let _ = client2.load_from_db(); | ||
|
|
||
| let mut updates = client2.watch_status(trade_id).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.
this doesn't really test if the database is used because watch_status(...) fetches the new status? we need a way to verify that there is state present (cached one) without fetching again
orangefren-client/client/src/lib.rs
Outdated
| is_terminal: true, | ||
| description: e.to_string(), | ||
| valid_for: Duration::from_secs(30), | ||
| raw_json: "None".to_string(), |
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.
we never want to use stringy types, if this can be null, then use Option<_>
orangefren-client/client/src/lib.rs
Outdated
|
|
||
| entry.1.push(status.clone()); | ||
|
|
||
| sqlx::query!( |
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.
This should be a wrapper function in database.rs. Try not to execute SQL statements outside of database.rs
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.
good first draft! we also need a way to access more of the internal data (especially the deposit_address)
@Einliterflasche will give this another review too
general optimization
API for currnecy exchange service "orangefren"