diff --git a/lib/reducers/cosmosV0-reducers.js b/lib/reducers/cosmosV0-reducers.js index 01f65286bb..cea03d69f6 100644 --- a/lib/reducers/cosmosV0-reducers.js +++ b/lib/reducers/cosmosV0-reducers.js @@ -318,9 +318,17 @@ function rewardCoinReducer(reward, stakingDenom) { const stringBit = reward.match(/[a-z]+/gi) const multiDenomRewardsArray = reward.split(`,`) if (multiDenomRewardsArray.length > 1) { - return multiDenomRewardsArray - .map(reward => rewardCoinReducer(reward)) - .filter(({ denom }) => denom === denomLookup(stakingDenom))[0] + const mappedMultiDenomRewardsArray = multiDenomRewardsArray.map(reward => + rewardCoinReducer(reward) + ) + let stakingDenomRewards = mappedMultiDenomRewardsArray.find( + ({ denom }) => denom === denomLookup(stakingDenom) + ) + // if there is no staking denom reward we will display the first alt-token reward + return ( + stakingDenomRewards || + mappedMultiDenomRewardsArray.find(({ amount }) => amount > 0) + ) } return { denom: denomLookup(stringBit),