{t('Not connected')}
+{t('Not connected')}
); } @@ -276,20 +284,47 @@ export const RewardPot = ({ > ) : ( -{t('No rewards')}
+{t('No rewards')}
)} ); }; export const Vesting = ({ + assetId, pubKey, baseRate, + multiplier, + vestingBalancesSummary, + epoch, }: { + assetId: string; pubKey: string | null; baseRate: string; + multiplier: string | undefined; + vestingBalancesSummary: VestingBalances | undefined; + epoch: number; }) => { + const { data: asset } = useAssetDataProvider(assetId); + + if (!asset) return null; + const baseRateFormatted = formatPercentage(Number(baseRate)); + + const lockedEntries = vestingBalancesSummary?.lockedBalances?.filter( + (b) => b.asset.id === assetId + ); + + const unlockingNextEpoch = lockedEntries?.filter( + (e) => e.untilEpoch === epoch + 1 + ); + + const nextEpochBalances = unlockingNextEpoch?.length + ? unlockingNextEpoch.map((e) => e.balance) + : [0]; + + const totalUnlockingNextEpoch = BigNumber.sum.apply(null, nextEpochBalances); + return ({t('No active reward bonuses')}
+{t('No active reward bonuses')}