From be672509f8e948bfa96939609410dc9694caec35 Mon Sep 17 00:00:00 2001 From: Peter Benc Date: Mon, 9 Nov 2020 10:35:27 +0100 Subject: [PATCH] Fix reward type and itn rewards --- .../components/pages/delegations/stakingHistoryPage.tsx | 6 +++++- app/frontend/wallet/shelley-wallet.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/frontend/components/pages/delegations/stakingHistoryPage.tsx b/app/frontend/components/pages/delegations/stakingHistoryPage.tsx index 58d09ac7e9..d83a3b4285 100644 --- a/app/frontend/components/pages/delegations/stakingHistoryPage.tsx +++ b/app/frontend/components/pages/delegations/stakingHistoryPage.tsx @@ -71,7 +71,11 @@ const StakingRewardItem = ({stakingReward}: {stakingReward: StakingReward}) => {
-
Reward for epoch {stakingReward.forEpoch}
+ {stakingReward.forEpoch ? ( +
Reward for epoch {stakingReward.forEpoch}
+ ) : ( +
Reward for ITN
+ )}
diff --git a/app/frontend/wallet/shelley-wallet.ts b/app/frontend/wallet/shelley-wallet.ts index 3a51f7aa0c..a0c107016e 100644 --- a/app/frontend/wallet/shelley-wallet.ts +++ b/app/frontend/wallet/shelley-wallet.ts @@ -402,7 +402,7 @@ const ShelleyWallet = ({ ...poolInfo, }, rewardDetails, - value: accountInfo.rewards || 0, + value: accountInfo.rewards ? parseInt(accountInfo.rewards, 10) : 0, } }