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

feat: add logic to have real delegation balances #8154

Merged

Conversation

cpl121
Copy link
Member

@cpl121 cpl121 commented Mar 7, 2024

Closes #8112

TODO comment -> #8187

Summary

Please summarize your changes, describing what they are and why they were made.

...

Changelog

- Please write a list of changes

Testing

Platforms

Please select any platforms where your changes have been tested.

  • Desktop
    • MacOS
    • Linux
    • Windows

Instructions

Please describe the specific instructions, configurations, and/or test cases necessary to test and verify that your changes work as intended.

...

Checklist

Please tick the following boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or modified tests that prove my changes work as intended
  • I have verified that new and existing unit tests pass locally with my changes
  • I have verified that my latest changes pass CI workflows for testing and linting
  • I have made corresponding changes to the documentation

@cpl121 cpl121 linked an issue Mar 7, 2024 that may be closed by this pull request
@cpl121 cpl121 marked this pull request as ready for review March 7, 2024 00:28
Copy link
Collaborator

@marc2332 marc2332 left a comment

Choose a reason for hiding this comment

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

We should close the popup once we know the new delegation outputs

@cpl121 cpl121 requested a review from marc2332 March 11, 2024 12:26
$: rawDelegatedAmount = delegationOutputs.reduce((acc, prev) => acc + Number(prev.output.amount), 0)
$: formattedDelegated = formatTokenAmountBestMatch(rawDelegatedAmount, baseCoin.metadata)

$: rawUndelegatedAmount = Number($selectedWallet.balances.baseCoin.available) - rawDelegatedAmount
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should check whether selectedWallet is undefined or not as it will be undefined or null whtn the user logs out

Cannot read properties of undefined (reading 'balances')
TypeError: Cannot read properties of undefined (reading 'balances')
    at $$self.$$.update (http://localhost:3333/build/index.js:200467:70)
    at update (http://localhost:3333/build/index.js:358186:12)
    at flush (http://localhost:3333/build/index.js:358150:17)

Copy link
Collaborator

@marc2332 marc2332 left a comment

Choose a reason for hiding this comment

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

also, you could try making the CSS have a better sizing so there aren't layout shifts as this:
image
image

…'develop-iota2.0' of github.com:iotaledger/firefly into feat/add-logic-to-have-real-delegation-balances
@cpl121 cpl121 requested a review from marc2332 March 11, 2024 16:17
cpl121 and others added 2 commits March 12, 2024 17:37
…'develop-iota2.0' of github.com:iotaledger/firefly into feat/add-logic-to-have-real-delegation-balances
@cpl121 cpl121 merged commit 265d691 into develop-iota2.0 Mar 12, 2024
3 of 4 checks passed
@cpl121 cpl121 deleted the feat/add-logic-to-have-real-delegation-balances branch March 12, 2024 17:45
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.

[Task]: Add logic to have real delegation balances
3 participants