Skip to content
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

Merged
merged 9 commits into from
Jan 23, 2024
Merged

Conversation

bonomat
Copy link
Contributor

@bonomat bonomat commented Jan 22, 2024

This was a bit of a PITA 🙈

resolves #1863

image

Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Copy link
Contributor

@luckysori luckysori left a 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
Copy link
Contributor

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.

Copy link
Contributor Author

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 :)

.to_f32()
.context("To be able to parse leverage into f32")?,
contract_symbol: ContractSymbol::BtcUsd,
direction: Direction::Long,
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@@ -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)]
Copy link
Contributor

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?

Copy link
Contributor Author

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'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice.

Copy link
Contributor

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>
@bonomat bonomat force-pushed the feat/create-orders branch from 634b35e to 80ca109 Compare January 23, 2024 06:55
@bonomat bonomat enabled auto-merge January 23, 2024 07:04
@bonomat bonomat disabled auto-merge January 23, 2024 07:04
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
@bonomat
Copy link
Contributor Author

bonomat commented Jan 23, 2024

Played around with the design a bit. A bit better but not perfect yet:

image image

Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
@bonomat bonomat added this pull request to the merge queue Jan 23, 2024
Merged via the queue into get10101:main with commit eedd6fd Jan 23, 2024
9 checks passed
@bonomat bonomat deleted the feat/create-orders branch January 23, 2024 09:03
@bonomat bonomat mentioned this pull request Jan 23, 2024
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.

Web: open new position
2 participants