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

Reason simplification #858

Merged

Conversation

tworec
Copy link
Contributor

@tworec tworec commented Dec 10, 2020

Copy link
Contributor

@nieznanysprawiciel nieznanysprawiciel left a comment

Choose a reason for hiding this comment

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

Is there easy way to convert from Reason to custom structure?

@@ -21,7 +22,7 @@ pub enum ProposalResponse {
"reason.as_ref().map(|r| format!(\" (reason: {})\", r)).unwrap_or(\"\".into())"
)]
RejectProposal {
reason: Option<String>,
reason: Option<Reason>,
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -37,7 +38,7 @@ pub enum AgreementResponse {
"reason.as_ref().map(|r| format!(\" (reason: {})\", r)).unwrap_or(\"\".into())"
)]
RejectAgreement {
reason: Option<String>,
reason: Option<Reason>,
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

match Reason::from_value(self) {
Ok(r) => Some(r),
Err(e) => {
log::warn!("{}", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

This message could be bettter

Comment on lines +177 to +178
#ya-client = { path = "../ya-client" }
#ya-client-model = { path = "../ya-client/model" }
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to remember to clean this

@nieznanysprawiciel nieznanysprawiciel merged commit 2fcfd20 into provider/multi-activity-agreements Dec 10, 2020
@tworec tworec deleted the market/reason-simplify branch December 11, 2020 15:36
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