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

Allow using account mana for allotments, fix semantic validation #1986

Conversation

Thoralf-M
Copy link
Member

Description of change

Allow using account Mana for allotments, fix semantic validation (only add allotments Mana to output Mana once)

Links to any relevant issues

#1918

Type of change

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Sending a transaction with only accounts as inputs

@Thoralf-M Thoralf-M marked this pull request as draft February 13, 2024 16:19
*output = match output {
Output::Account(a) => AccountOutputBuilder::from(&*a).with_mana(new_mana).finish_output()?,
if self.mana_allotments[&issuer_id].0 < required_allotment_mana {
let (selected_mana, required_mana) = self.mana_sums_without_allotments()?;

Choose a reason for hiding this comment

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

I think you'd be better off using the regular method and subtracting the specific allotment for this issuer

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's one reason why I wrote still needs cleanup

@Thoralf-M
Copy link
Member Author

Commits were partially picked for #1961

@Thoralf-M Thoralf-M closed this Feb 14, 2024
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.

3 participants