Skip to content

Conversation

@Matroskine
Copy link

API for currnecy exchange service "orangefren"

@binarybaron binarybaron changed the title orangefren client API feat: OrangeFren client Oct 24, 2025

let _ = client2.load_from_db();

let mut updates = client2.watch_status(trade_id).await;

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

is_terminal: true,
description: e.to_string(),
valid_for: Duration::from_secs(30),
raw_json: "None".to_string(),

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<_>


entry.1.push(status.clone());

sqlx::query!(

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

Copy link

@binarybaron binarybaron left a 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants