Skip to content

Commit

Permalink
fix: do not display freeze info when all utxos have been selected (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Jul 22, 2022
1 parent 24c0107 commit 662faf2
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions src/components/fb/FidelityBondSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,26 +209,30 @@ const FreezeUtxos = ({ walletInfo, jar, utxos, selectedUtxos, isLoading = false
isSelected={true}
/>
))}
{fb.utxo.allAreFrozen(utxosToFreeze) ? (
<div className={styles.stepDescription}>
{t('earn.fidelity_bond.freeze_utxos.description_unselected_utxos')}
</div>
) : (
<div className={styles.stepDescription}>
{t('earn.fidelity_bond.freeze_utxos.description_unselected_utxos')}{' '}
{t('earn.fidelity_bond.freeze_utxos.description_selected_utxos_to_freeze', { jar })}
</div>
{utxosToFreeze.length > 0 && (
<>
{fb.utxo.allAreFrozen(utxosToFreeze) ? (
<div className={styles.stepDescription}>
{t('earn.fidelity_bond.freeze_utxos.description_unselected_utxos')}
</div>
) : (
<div className={styles.stepDescription}>
{t('earn.fidelity_bond.freeze_utxos.description_unselected_utxos')}{' '}
{t('earn.fidelity_bond.freeze_utxos.description_selected_utxos_to_freeze', { jar })}
</div>
)}
{utxosToFreeze.map((utxo, index) => (
<UtxoCard
key={index}
utxo={utxo}
status={walletInfo.addressSummary[utxo.address]?.status}
isSelectable={false}
isSelected={false}
isLoading={isLoading}
/>
))}
</>
)}
{utxosToFreeze.map((utxo, index) => (
<UtxoCard
key={index}
utxo={utxo}
status={walletInfo.addressSummary[utxo.address]?.status}
isSelectable={false}
isSelected={false}
isLoading={isLoading}
/>
))}
</div>
)
}
Expand Down

0 comments on commit 662faf2

Please sign in to comment.