Skip to content

Commit

Permalink
Removed forced rewards blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
vsubhuman committed Sep 24, 2021
1 parent 054cbf9 commit 5e297b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
18 changes: 7 additions & 11 deletions packages/yoroi-extension/app/components/topbar/NavWalletDetails.js
Expand Up @@ -63,8 +63,6 @@ export default class NavWalletDetails extends Component<Props> {
shouldHideBalance,
onUpdateHideBalance,
highlightTitle,
// <TODO:RWRD2109>
// eslint-disable-next-line no-unused-vars
rewards,
walletAmount,
assetDeposit,
Expand Down Expand Up @@ -115,6 +113,12 @@ export default class NavWalletDetails extends Component<Props> {
</p>
{this.renderAmountDisplay({ shouldHideBalance, amount: walletAmount })}
</div>
<div>
<p className={styles.label}>
{intl.formatMessage(globalMessages.rewardsLabel)}&nbsp;
</p>
{this.renderAmountDisplay({ shouldHideBalance, amount: rewards })}
</div>
{isNonZeroDeposit ? (
<div>
<p className={styles.label}>
Expand All @@ -123,13 +127,6 @@ export default class NavWalletDetails extends Component<Props> {
{this.renderAmountDisplay({ shouldHideBalance, amount: assetDeposit })}
</div>
) : null}
{/* <TODO:RWRD2109> */}
{/* <div> */}
{/* <p className={styles.label}> */}
{/* {intl.formatMessage(globalMessages.rewardsLabel)}&nbsp; */}
{/* </p> */}
{/* {this.renderAmountDisplay({ shouldHideBalance, amount: rewards })} */}
{/* </div> */}
</div>
}
{this.props.rewards === undefined && (
Expand Down Expand Up @@ -164,8 +161,7 @@ export default class NavWalletDetails extends Component<Props> {
if (this.props.rewards === null || this.props.walletAmount === null) {
return null;
}
// <TODO:RWRD2109>
return this.props.walletAmount; // .joinAddCopy(this.props.rewards);
return this.props.walletAmount.joinAddCopy(this.props.rewards);
}

renderAmountDisplay: {|
Expand Down
Expand Up @@ -145,9 +145,7 @@ export default class UserSummary extends Component<Props, State> {
<h3 className={styles.label}>
{intl.formatMessage(globalMessages.totalRewardsLabel)}:
</h3>
{/* <TODO:RWRD2109> */}
Due to protocol update, the rewards are being recalculated.
{/* {this.renderAmount(this.props.totalRewards)} */}
{this.renderAmount(this.props.totalRewards)}
</div>
<div className={styles.footer}>
{this.props.withdrawRewards != null && (
Expand All @@ -156,7 +154,6 @@ export default class UserSummary extends Component<Props, State> {
label={intl.formatMessage(globalMessages.withdrawLabel)}
onClick={this.props.withdrawRewards}
skin={ButtonSkin}
disabled // <TODO:RWRD2109>
/>
)}
<div
Expand Down
Expand Up @@ -715,8 +715,6 @@ export default class StakingDashboardPage extends Component<Props> {
const txRequests = this.generated.stores.transactions.getTxRequests(request.publicDeriver);
const balance = txRequests.requests.getBalanceRequest.result;

// <TODO:RWRD2109>
// eslint-disable-next-line no-unused-vars
const rewardBalance =
request.delegationRequests.getDelegatedBalance.result == null
? new MultiToken([], defaultToken)
Expand Down Expand Up @@ -745,7 +743,7 @@ export default class StakingDashboardPage extends Component<Props> {
totalSum={
balance == null
? undefined
: balance // .joinAddCopy(rewardBalance) // <TODO:RWRD2109>
: balance.joinAddCopy(rewardBalance)
}
totalRewards={
!showRewardAmount || request.delegationRequests.getDelegatedBalance.result == null
Expand Down

0 comments on commit 5e297b0

Please sign in to comment.