Skip to content
Snippets Groups Projects
Commit bd5f9bc3 authored by Dima Rifai's avatar Dima Rifai
Browse files

Issue #399 - Fix string issue by sending zero to vest function if there are no vests

parent 42ce4585
No related branches found
No related tags found
1 merge request!532Delrifai/#399 cannot read string error
Pipeline #114079 canceled
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment