-
Notifications
You must be signed in to change notification settings - Fork 37
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: TAO staking #1682
base: dev
Are you sure you want to change the base?
feat: TAO staking #1682
Conversation
fetch payload with 0n plancks and invalidate form if pancks is < 0n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
apps/extension/src/ui/domains/Staking/hooks/bittensor/useGetBittensorSupportedDelegates.ts
Show resolved
Hide resolved
apps/extension/src/ui/domains/Staking/hooks/bittensor/useGetBittensorValidator.ts
Show resolved
Hide resolved
apps/extension/src/ui/domains/Staking/hooks/bittensor/useGetBittensorInfiniteValidators.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor things, please check below.
another that didnt fit to a particular part of the code is that i see bittensor staking related hooks being called a lot for no reason, especially in AssetDetails
calling any of them loads bittensor sapi object which downloads the full metadata.
Unless a bittensor balance is detected, it would be nice to make sure those hooks do nothing.
Note: at this time even if if bittensor is disabled in settings, they will fetch metadata and execute all the logic
apps/extension/src/ui/domains/Staking/hooks/bittensor/useCombineBittensorStakeInfo.ts
Outdated
Show resolved
Hide resolved
apps/extension/src/ui/domains/Staking/shared/StakingUnbondingPeriod.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more comments, apologies - these got lost in vs code PR review process somewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one more change needed in TxProgress :)
networkIdOrHash, | ||
onClose, | ||
className, | ||
onSuccess, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry i didnt dig this thing enough last time.
It feels like success detection shouldnt originate from here, which is a UI component that is meant to support both EVM and substrate.
Option 1 : use useTransaction(hash) from useUnbondWizard() to detect success from there, without needing any callbacks, and rollback all changes to this component
Option 2 : move the success check from TxProgressSubstrate up to TxProgress, so it can support both substrate and evm
Preference for option 1 though
Description
Implements TAO staking
TAOSTATS_API_KEY
to .envTechical
NomPoolBondModal
->BondModal
useGetStakeInfo
anduseGetUnbondInfo
hooks to support the wizard hooks. These hooks are responsible for returning all the information that is specific to an Asset that is being staked/unbonded.minJoinBond
if the input amount is 0 or less than min for that pool, disable form submission ifplanks
is < 0nTODO's
🖼️ Screenshots:
Screen.Recording.2024-11-14.at.20.33.17.mov