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: merged jars #114

Draft
wants to merge 66 commits into
base: dev
Choose a base branch
from
Draft

refactor: merged jars #114

wants to merge 66 commits into from

Conversation

vasyafromrussia
Copy link
Collaborator

No description provided.

self.score = AccountScore::new(timezone);
}
(None, false) => {
panic_str("Trying to create score based jar for without providing time zone");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
panic_str("Trying to create score based jar for without providing time zone");
panic_str("Trying to create score based jar without providing time zone");

Copy link
Collaborator

@VladasZ VladasZ left a comment

Choose a reason for hiding this comment

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

Excellent job!  💪
Not only the jars were optimized but overall the architecture became cleaner.
Approving on condition that all other comments will be fixed.

pub struct JarV2 {
pub deposits: Vec<Deposit>,
pub cache: Option<JarCache>,
// TODO: get rid of it
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will you do it in this PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yas

contract/src/jar/account/v1.rs Outdated Show resolved Hide resolved
contract/src/jar/account/v1.rs Show resolved Hide resolved
contract/src/product/model/v1.rs Show resolved Hide resolved
/// Describes additional terms for Flexible products.
Flexible(FlexibleProductTerms),

/// TODO: doc
Copy link
Collaborator

Choose a reason for hiding this comment

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

doc

contract/src/claim/api.rs Outdated Show resolved Hide resolved
contract/src/score/account_score.rs Outdated Show resolved Hide resolved
contract/src/claim/api.rs Outdated Show resolved Hide resolved
self
}

pub(crate) fn try_lock(&mut self) -> &mut Self {
Copy link
Collaborator

Choose a reason for hiding this comment

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

In which cases we use lock and in which try_lock?

contract/src/jar/api.rs Outdated Show resolved Hide resolved
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