Skip to content

Commit

Permalink
Tier display fix (#1331)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobo-k2 authored Jun 21, 2024
1 parent 4bfeaca commit 446e4ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/staking-v3/hooks/useDappStaking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
AccountLedger,
CombinedDappInfo,
Constants,
DAppTier,
DAppTierRewards,
DappStakeInfo,
EraInfo,
Expand Down Expand Up @@ -141,7 +142,7 @@ export function useDappStaking() {
() => store.getters['stakingV3/getTiersConfiguration'] ?? initialTiersConfiguration
);

const leaderboard = computed<Map<number, number>>(
const leaderboard = computed<Map<number, DAppTier>>(
() => store.getters['stakingV3/getLeaderboard']
);

Expand Down Expand Up @@ -574,7 +575,7 @@ export function useDappStaking() {

const getDappTier = (dappId: number): number | undefined => {
const tier = leaderboard.value?.get(dappId);
return tier !== undefined ? tier + 1 : undefined;
return tier !== undefined ? tier.tierId + 1 : undefined;
};

const fetchStakerInfoToStore = async (): Promise<void> => {
Expand Down

0 comments on commit 446e4ea

Please sign in to comment.