diff --git a/hooks/api/common/useWitnessDetails.ts b/hooks/api/common/useWitnessDetails.ts index 5c04f1d5666906b96aaf71df0b7cc1142d8075f8..d033bcead13af75aeddb340f9542f445ea994cc8 100644 --- a/hooks/api/common/useWitnessDetails.ts +++ b/hooks/api/common/useWitnessDetails.ts @@ -13,11 +13,11 @@ const useWitnessDetails = (accountName: string, isWitness: boolean) => { const witness = { ...witnessData, votes_updated_at: witnessData.votes_updated_at, - vests: hiveChain?.vests(witnessData.witness.vests), + vests: witnessData.witness.vests? hiveChain?.vests(witnessData.witness.vests):hiveChain?.vests(0) , hbd_interest_rate: formatPercent(witnessData.witness.hbd_interest_rate), - votes_daily_change: hiveChain?.vests( + votes_daily_change:witnessData.witness.votes_daily_change ? hiveChain?.vests( witnessData.witness.votes_daily_change - ), + ):hiveChain?.vests(0) , }; const formattedWitness = hiveChain?.formatter.format( witness