-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat (webapp): show open position #1871
Conversation
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
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.
LGTM in general. Haven't considered how it looks yet, but we can iterate on that.
@@ -110,3 +110,6 @@ Cargo.lock | |||
*.pdb | |||
|
|||
# End of https://www.toptal.com/developers/gitignore/api/flutter,dart,rust | |||
|
|||
# data directory for webapp | |||
data |
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.
I thought we were meaning to share the data
directory with the root of the project. This is not wrong though.
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.
Yea, but if you run cargo run
from the sub folder it will generate this which is not wrong but annoying to have :)
webapp/src/api.rs
Outdated
.to_f32() | ||
.context("To be able to parse leverage into f32")?, | ||
contract_symbol: ContractSymbol::BtcUsd, | ||
direction: Direction::Long, |
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.
📣 I guess you don't want to hard-code this.
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 catch
mobile/native/src/trade/order/mod.rs
Outdated
@@ -13,7 +15,7 @@ mod orderbook_client; | |||
// When naming this the same as `api_model::order::OrderType` the generated code somehow uses | |||
// `trade::OrderType` and contains errors, hence different name is used. | |||
// This is likely a bug in frb. | |||
#[derive(Debug, Clone, Copy, PartialEq)] | |||
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] |
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.
🔧 I can't see why we need this change. What am I missing?
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 catch, I guess I was using the wrong types at first
const host = "localhost"; | ||
|
||
final response = await http.get(Uri.http('$host:$port', '/api/history')); | ||
final response = await HttpClientManager.instance.get(Uri(path: '/api/history')); |
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.
👍 Nice.
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.
🔧 Name of file has typo.
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
This will just add the text from `FlutterError` in front of the already thrown exception. Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
with this we can at ease call endpoints from rust while in dev and while in deploy mode Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Note: it's not responsive yet and doesn't look good on a small screen Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
634b35e
to
80ca109
Compare
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
This was a bit of a PITA 🙈
resolves #1863