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: enable address options when multiple addresses selected #934

Merged
merged 32 commits into from
Feb 3, 2025

Conversation

shahin-hq
Copy link
Contributor

@shahin-hq shahin-hq commented Jan 31, 2025

Summary

Closes some part of: https://app.clickup.com/t/86dvv87dm

Changelog:

  • Enables address options dropdown when multiple addresses are selected
  • Refactors send validator registration logic to support address selection
    • Fixes fee registration
    • Fixes back, error navigation routes
Screencast.from.2025-02-03.17-06-15.webm

Checklist

  • My changes look good in both light AND dark mode
  • The change is not hardcoded to a single network, but has multi-asset in mind
  • I checked my changes for obvious issues, debug statements and commented code
  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

Copy link

vercel bot commented Jan 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
arkvault ✅ Ready (Inspect) Visit Preview Feb 3, 2025 2:39pm

// }

const walletsWithValidatorActions = wallets.filter(
(w) => w.balance() > 0 && !isMultiSignature(w) && isRestoredAndSynced(w),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am filtering out wallets with the given checks, otherwise it'd throw an error when checking w.isValidator() - it has to be synced before this check

const isWalletRestoredAndSynced = useMemo(() => isRestoredAndSynced(wallet), [wallet]);
const areWalletsRestoredAndSynced = useMemo(
() => wallets.map((wallet) => isRestoredAndSynced(wallet)).join("-"),
[wallets],
Copy link
Contributor Author

@shahin-hq shahin-hq Feb 3, 2025

Choose a reason for hiding this comment

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

I had to implement such workaround to get the same behavior as it was. This will generate a primitive true-false-true and we will pass it to dependency array.

@ItsANameToo ItsANameToo added this to the mainsail-evm milestone Feb 3, 2025
@ItsANameToo ItsANameToo merged commit cb90ef7 into feat/evm Feb 3, 2025
17 checks passed
@ItsANameToo ItsANameToo deleted the refactor/enable-address-options branch February 3, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants