Display locked amounts (#1784)
This commit is contained in:
parent
05f477da53
commit
5c380308ec
@ -20,7 +20,7 @@ interface Props extends I18nProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const WITH_BALANCE = { available: true, bonded: true, free: true, reserved: true, total: true };
|
||||
const WITH_BALANCE = { available: true, bonded: true, free: true, locked: true, reserved: true, total: true };
|
||||
const WITH_EXTENDED = { nonce: true };
|
||||
|
||||
const isEditable = true;
|
||||
|
||||
@ -22,6 +22,7 @@ import translate from './translate';
|
||||
export interface BalanceActiveType {
|
||||
available?: boolean;
|
||||
bonded?: boolean | BN[];
|
||||
locked?: boolean;
|
||||
redeemable?: boolean;
|
||||
reserved?: boolean;
|
||||
total?: boolean;
|
||||
@ -53,6 +54,7 @@ interface Props extends BareProps, I18nProps {
|
||||
const DEFAULT_BALANCES: BalanceActiveType = {
|
||||
available: true,
|
||||
bonded: true,
|
||||
locked: true,
|
||||
redeemable: true,
|
||||
reserved: true,
|
||||
total: true,
|
||||
@ -209,6 +211,12 @@ function renderBalances (props: Props): React.ReactNode {
|
||||
<div className='result'>{formatBalance(balances_all.availableBalance)}</div>
|
||||
</>
|
||||
)}
|
||||
{balanceDisplay.locked && balances_all.lockedBalance && balances_all.lockedBalance.gtn(0) && (
|
||||
<>
|
||||
<Label label={t('locked')} />
|
||||
<div className='result'>{formatBalance(balances_all.lockedBalance)}</div>
|
||||
</>
|
||||
)}
|
||||
{balanceDisplay.reserved && balances_all.reservedBalance && balances_all.reservedBalance.gtn(0) && (
|
||||
<>
|
||||
<Label label={t('reserved')} />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user