Skip to content

Commit

Permalink
Merge branch 'main' into chore/re-enable-ksm-routes
Browse files Browse the repository at this point in the history
  • Loading branch information
UrbanWill authored Sep 20, 2024
2 parents 1040a2f + 0c59063 commit 18be6bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/portal/src/domains/staking/subtensor/hooks/useApr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ export const useApr = (genesisHash: string | undefined) => {
return useAtomValue(stakingAprByChainAtomFamily(genesisHash))
}

const TAO_APY_PLACEHOLDER = '~16%'

export const useAprFormatted = (genesisHash: string | undefined) => {
const apr = useApr(genesisHash)

return apr ? apr.toLocaleString(undefined, { style: 'percent', maximumFractionDigits: 2 }) : '--'
return apr ? apr.toLocaleString(undefined, { style: 'percent', maximumFractionDigits: 2 }) : TAO_APY_PLACEHOLDER
}

0 comments on commit 18be6bd

Please sign in to comment.