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

Provider - fix debit notes property #1102

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

nieznanysprawiciel
Copy link
Contributor

resolves: #1100

Property name in Agreement differs from property name in Offer since it must be prefixed with "/offer/properties".

@nieznanysprawiciel nieznanysprawiciel added bug Something isn't working m-provider labels Mar 1, 2021
@nieznanysprawiciel nieznanysprawiciel self-assigned this Mar 1, 2021
@nieznanysprawiciel nieznanysprawiciel requested review from a team and mfranciszkiewicz March 1, 2021 16:50
@nieznanysprawiciel nieznanysprawiciel changed the base branch from master to release/v0.6 March 1, 2021 16:50
Comment on lines 146 to 151
if let Ok(deadline_prop) = offer.pointer_mut(DEBIT_NOTE_ACCEPT_TIMEOUT_PROP) {
*deadline_prop =
serde_json::Value::Number(req_deadline.num_seconds().into());
} else {
bail!("Unable to set property {}", DEBIT_NOTE_ACCEPT_TIMEOUT_PROP);
}
Copy link
Contributor Author

@nieznanysprawiciel nieznanysprawiciel Mar 3, 2021

Choose a reason for hiding this comment

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

We know that this property exists, because we checked it above (our_deadline)

Comment on lines 13 to 21
impl From<&Proposal> for ProposalView {
fn from(p: &Proposal) -> Self {
ProposalView {
json: expand(p.properties),
agreement_id: p.proposal_id,
}
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be in AgreementUtils

Copy link
Contributor

Choose a reason for hiding this comment

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

I wanted not to touch it this time

@nieznanysprawiciel nieznanysprawiciel force-pushed the provider/fix-debit-notes-property branch from 15cba08 to 4151ace Compare March 3, 2021 15:02
@nieznanysprawiciel nieznanysprawiciel merged commit b2cb66d into release/v0.6 Mar 3, 2021
@nieznanysprawiciel nieznanysprawiciel deleted the provider/fix-debit-notes-property branch March 3, 2021 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working m-provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

agreement stays open after a failing task
2 participants