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

fix(extension): check for empty assets and next bundle coin id on add… #1157

Merged

Conversation

vetalcore
Copy link
Contributor

@vetalcore vetalcore commented May 13, 2024

… bundle

Checklist

  • JIRA - LW-7143
  • Proper tests implemented
  • Screenshots added.

Proposed solution

Explain how does this PR solves the problem stated in JIRA ticket.
You can also enumerate different alternatives considered while approaching this task.

Testing

Describe here, how the new implementation can be tested.
Provide link or briefly describe User Acceptance Criteria/Tests that need to be met

Screenshots

Attach screenshots here if implementation involves some UI changes

@vetalcore vetalcore self-assigned this May 13, 2024
@vetalcore vetalcore requested a review from a team as a code owner May 13, 2024 17:39
Copy link

@@ -54,7 +54,7 @@ export const Form = ({

const { setNewOutput } = useOutputs();

const isEmptyAssets = assetBalances?.size === 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

in case assetBalances is undefined it won't be === 0
@mchappell @tommayeliog please correct me if i'm missing something.

Copy link
Collaborator

Choose a reason for hiding this comment

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

you've not missed anything, that's the correct check to implement 🚀

Comment on lines -103 to -105
const bundleDisabled = spendableCoin
? !getNextBundleCoinId(spendableCoin?.toString(), assetBalances, tokensUsed, assets, cardanoCoin)?.length
: false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

was it intended to set bundleDisabled to false if spendableCoin is falsy?
@mchappell @tommayeliog please correct me if i'm missing something.

Copy link

Allure Report

allure-report-publisher generated test report!

smokeTests: ✅ test report for d1c89ea3

passed failed skipped flaky total result
Total 30 0 0 0 30

Copy link
Contributor

@tommayeliog tommayeliog left a comment

Choose a reason for hiding this comment

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

nice!

@vetalcore vetalcore merged commit 2f2b1b2 into main May 14, 2024
9 checks passed
@vetalcore vetalcore deleted the fix/lw-7143-disable-add-bundle-if-no-assets-available branch May 14, 2024 19:03
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.

4 participants