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: LoanId out from ActiveLoan #1367

Merged
merged 2 commits into from May 26, 2023
Merged

Loans: LoanId out from ActiveLoan #1367

merged 2 commits into from May 26, 2023

Conversation

lemunozm
Copy link
Contributor

Description

This is a nitpicky change. But ideally, a LoanId should not belong to the ActiveLoan itself. A LoanId is an id used to identify such a loan, and should be handled at the pallet level, not at the loan level.

To rationale this, if instead of storing the ActiveLoans in a Vec, we would store it in a StorageMap, we should not place the LoanId in the ActiveLoan at the very beginning, as happen currently with CreatedLoans and ClosedLoans, so how we store the loans should not affect the data they hold.

@lemunozm lemunozm added Q1-easy Can be done by primarily duplicating and adapting code. P0-someday-maybe Issue might be worth doing someday. I6-refactoring Code needs refactoring. labels May 25, 2023
@lemunozm lemunozm self-assigned this May 25, 2023
Copy link
Contributor

@hieronx hieronx left a comment

Choose a reason for hiding this comment

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

👍

@lemunozm lemunozm enabled auto-merge (squash) May 26, 2023 06:48
@lemunozm lemunozm requested a review from hieronx May 26, 2023 06:48
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for being lightning fast ⚡️

Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for being lightning fast ⚡️

@hieronx hieronx disabled auto-merge May 26, 2023 08:01
@hieronx hieronx merged commit 4ac0413 into main May 26, 2023
11 checks passed
@lemunozm lemunozm deleted the loans/loan-id-refactor branch May 26, 2023 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I6-refactoring Code needs refactoring. P0-someday-maybe Issue might be worth doing someday. Q1-easy Can be done by primarily duplicating and adapting code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants