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

Refactor DotrainOrderGui with new yaml struct changes #1117

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

findolor
Copy link
Collaborator

@findolor findolor commented Jan 3, 2025

Caution

Do not merge before #1105

Motivation

See issue: #1035

Solution

  • Create a new method to get DotrainOrder during function calls
  • Save selected deployment name to get current deployment during function calls
  • Add missing update functions for missing structs

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

@findolor findolor self-assigned this Jan 4, 2025
@findolor findolor requested a review from hardyjosh January 6, 2025 06:31
@findolor findolor marked this pull request as ready for review January 6, 2025 06:32
@findolor findolor changed the title 2024 12 23 implement dotrain order gui Refactor DotrainOrderGui with new yaml struct changes Jan 6, 2025
@@ -154,6 +160,114 @@ impl Scenario {

Ok(())
}

pub fn update_bindings(
Copy link
Contributor

Choose a reason for hiding this comment

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

can't see any tests for this?

@@ -63,6 +63,165 @@ impl Order {
pub fn validate_vault_id(value: &str) -> Result<U256, ParseOrderConfigSourceError> {
U256::from_str(value).map_err(ParseOrderConfigSourceError::VaultParseError)
}

pub fn update_vault_id(
Copy link
Contributor

Choose a reason for hiding this comment

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

no tests?

Ok(self.clone())
}

pub fn populate_vault_ids(&mut self) -> Result<Self, YamlError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

no tests?

@@ -45,12 +46,11 @@ impl DotrainOrderGui {
return Err(GuiError::TokenNotFound(token_name.clone()));
}

let address = Address::from_str(&address)?;
select_tokens.insert(token_name.clone(), address);
let addr = Address::from_str(&address)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

why this renaming? is there reason?

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.

2 participants