about to add last couple features

This commit is contained in:
Anthony 2021-07-29 20:41:26 +02:00
parent bff0cd9a99
commit d98eabbcb9
No known key found for this signature in database
GPG key ID: C386D3C93D50E356
2 changed files with 8 additions and 30 deletions

View file

@ -13,30 +13,11 @@ import I18nMessage from 'component/i18nMessage';
import { formatNumberWithCommas } from 'util/number'; import { formatNumberWithCommas } from 'util/number';
type Props = { type Props = {
balance: number,
totalBalance: number,
claimsBalance: number,
supportsBalance: number,
tipsBalance: number,
doOpenModal: (string) => void,
hasSynced: boolean,
doFetchUtxoCounts: () => void,
doUtxoConsolidate: () => void,
fetchingUtxoCounts: boolean,
consolidatingUtxos: boolean,
consolidateIsPending: boolean,
massClaimingTips: boolean,
massClaimIsPending: boolean,
utxoCounts: { [string]: number },
accountDetails: any, accountDetails: any,
}; };
const WalletBalance = (props: Props) => { const WalletBalance = (props: Props) => {
const { const {
claimsBalance,
supportsBalance,
tipsBalance,
doOpenModal,
accountDetails, accountDetails,
} = props; } = props;
@ -79,16 +60,14 @@ const WalletBalance = (props: Props) => {
</dt> </dt>
<dd> <dd>
<span className="dd__text"> <span className="dd__text">
{Boolean(tipsBalance) && ( {Boolean(1) && (
<Button <Button
button="link" button="link"
className="dd__button" className="dd__button"
disabled={operationPending}
icon={ICONS.UNLOCK} icon={ICONS.UNLOCK}
onClick={() => doOpenModal(MODALS.MASS_TIP_UNLOCK)}
/> />
)} )}
<CreditAmount amount={tipsBalance} precision={4} /> <CreditAmount amount={1} precision={4} />
</span> </span>
</dd> </dd>
@ -97,7 +76,7 @@ const WalletBalance = (props: Props) => {
<span className="help--dt">({__('Delete or edit past content to spend')})</span> <span className="help--dt">({__('Delete or edit past content to spend')})</span>
</dt> </dt>
<dd> <dd>
<CreditAmount amount={claimsBalance} precision={4} /> <CreditAmount amount={1} precision={4} />
</dd> </dd>
<dt> <dt>
@ -105,7 +84,7 @@ const WalletBalance = (props: Props) => {
<span className="help--dt">({__('Delete supports to spend')})</span> <span className="help--dt">({__('Delete supports to spend')})</span>
</dt> </dt>
<dd> <dd>
<CreditAmount amount={supportsBalance} precision={4} /> <CreditAmount amount={1} precision={4} />
</dd> </dd>
</dl> </dl>
</div> </div>

View file

@ -68,16 +68,15 @@ const WalletBalance = (props: Props) => {
</dt> </dt>
<dd> <dd>
<span className="dd__text"> <span className="dd__text">
{Boolean(tipsBalance) && ( {Boolean(1) && (
<Button <Button
button="link" button="link"
className="dd__button" className="dd__button"
disabled={operationPending}
icon={ICONS.UNLOCK} icon={ICONS.UNLOCK}
onClick={() => doOpenModal(MODALS.MASS_TIP_UNLOCK)} onClick={() => doOpenModal(MODALS.MASS_TIP_UNLOCK)}
/> />
)} )}
<CreditAmount amount={tipsBalance} precision={4} /> <CreditAmount amount={1} precision={4} />
</span> </span>
</dd> </dd>
@ -86,7 +85,7 @@ const WalletBalance = (props: Props) => {
<span className="help--dt">({__('Delete or edit past content to spend')})</span> <span className="help--dt">({__('Delete or edit past content to spend')})</span>
</dt> </dt>
<dd> <dd>
<CreditAmount amount={claimsBalance} precision={4} /> <CreditAmount amount={1} precision={4} />
</dd> </dd>
<dt> <dt>
@ -94,7 +93,7 @@ const WalletBalance = (props: Props) => {
<span className="help--dt">({__('Delete supports to spend')})</span> <span className="help--dt">({__('Delete supports to spend')})</span>
</dt> </dt>
<dd> <dd>
<CreditAmount amount={supportsBalance} precision={4} /> <CreditAmount amount={1} precision={4} />
</dd> </dd>
</dl> </dl>
</div> </div>