Skip to content

Commit

Permalink
Fix for Stake pool large pledge quantity and delegation wallet amount…
Browse files Browse the repository at this point in the history
… improvement
  • Loading branch information
Tomislav Horaček committed Jul 6, 2020
1 parent de1d0a0 commit 0a1d08a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion source/renderer/app/api/api.js
Expand Up @@ -1927,7 +1927,9 @@ const _createStakePoolFromServerData = action(
description,
isCharity: false,
name,
pledge: new BigNumber(pledgeQuantity).dividedBy(LOVELACES_PER_ADA),
pledge: new BigNumber(pledgeQuantity.toString()).dividedBy(
LOVELACES_PER_ADA
),
profitMargin: profitMarginPercentage,
ranking: index + 1,
retiring: null,
Expand Down
Expand Up @@ -96,7 +96,7 @@ export default class WalletRow extends Component<Props> {
const {
wallet: {
name,
amount,
availableAmount,
isRestoring,
syncState,
delegatedStakePoolId,
Expand Down Expand Up @@ -157,7 +157,7 @@ export default class WalletRow extends Component<Props> {
<FormattedMessage
{...messages.walletAmount}
values={{
amount: amount.toFormat(DECIMAL_PLACES_IN_ADA),
amount: availableAmount.toFormat(DECIMAL_PLACES_IN_ADA),
}}
/>
</div>
Expand Down
Expand Up @@ -90,7 +90,7 @@ export default class WalletsDropdown extends Component<Props> {
({
name: label,
id: value,
amount,
availableAmount,
delegatedStakePoolId,
lastDelegationStakePoolId,
pendingDelegations,
Expand All @@ -102,7 +102,7 @@ export default class WalletsDropdown extends Component<Props> {
currentStakePoolId = lastDelegationStakePoolId;
}
const delegatedStakePool = getStakePoolById(currentStakePoolId);
const detail = formattedWalletAmount(amount);
const detail = formattedWalletAmount(availableAmount);
return {
detail,
label,
Expand Down

0 comments on commit 0a1d08a

Please sign in to comment.