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

Loans: maturity extension support #1445

Merged
merged 31 commits into from Jul 11, 2023
Merged

Loans: maturity extension support #1445

merged 31 commits into from Jul 11, 2023

Conversation

lemunozm
Copy link
Contributor

@lemunozm lemunozm commented Jul 6, 2023

Description

Fixes #1405

Changes and Descriptions

  • Add extension field to Maturity::Fixed
  • Add new loan mutation: MaturityExtension

@lemunozm lemunozm added the D8-migration Pull request touches storage and needs migration code. label Jul 6, 2023
@lemunozm lemunozm requested a review from hieronx July 6, 2023 18:18
@lemunozm lemunozm self-assigned this Jul 6, 2023
pallets/loans/src/types/mod.rs Outdated Show resolved Hide resolved
runtime/common/src/lib.rs Show resolved Hide resolved
pallets/loans/src/types/mod.rs Outdated Show resolved Hide resolved
pallets/loans/src/types/mod.rs Show resolved Hide resolved
hieronx
hieronx previously approved these changes Jul 7, 2023
Base automatically changed from loans/principal-and-interest to main July 10, 2023 17:32
@lemunozm lemunozm dismissed hieronx’s stale review July 10, 2023 17:32

The base branch was changed.

@lemunozm
Copy link
Contributor Author

I've rebased this already approved by Jeroen, it would be awesome if you could give a re-approve it @mustermeiszer 🙌🏻

@mustermeiszer
Copy link
Collaborator

@lemunozm does this need a migration? Because I can not spot the migration code ^^

Just am worried we forget about it if we add it later.

Comment on lines +96 to 102
Fixed {
/// Secs when maturity ends
date: Moment,
/// Extension in secs, without special permissions
extension: Moment,
},
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the migration. But it needs migration "theoretically". Right now we can purge all pallet-loans storage. It only requires a migration if it is used before we can deploy these changes. The same applies to all pending PRs

Copy link
Contributor Author

@lemunozm lemunozm Jul 11, 2023

Choose a reason for hiding this comment

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

Ah ok, I read you wrong 😆, I pointed to the code that causes the migration. No, there is no migration done, but should not be done by now

@lemunozm lemunozm enabled auto-merge (squash) July 11, 2023 09:07
@lemunozm lemunozm disabled auto-merge July 11, 2023 09:07
@lemunozm lemunozm enabled auto-merge (squash) July 11, 2023 09:10
Copy link
Collaborator

@mustermeiszer mustermeiszer left a comment

Choose a reason for hiding this comment

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

LGTM!

@lemunozm lemunozm merged commit 85aef36 into main Jul 11, 2023
11 checks passed
@lemunozm lemunozm deleted the loans/maturity-extension branch July 11, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D8-migration Pull request touches storage and needs migration code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loans: Fixed maturity with extension
3 participants