Changeset View
Changeset View
Standalone View
Standalone View
cashtab/src/components/Common/BalanceHeader.tsx
| // Copyright (c) 2024 The Bitcoin developers | // Copyright (c) 2024 The Bitcoin developers | ||||
| // Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
| import * as React from 'react'; | import * as React from 'react'; | ||||
| import styled from 'styled-components'; | import styled from 'styled-components'; | ||||
| import CashtabSettings, { | import CashtabSettings, { | ||||
| supportedFiatCurrencies, | supportedFiatCurrencies, | ||||
| } from 'config/CashtabSettings'; | } from 'config/CashtabSettings'; | ||||
| import appConfig from 'config/app'; | import appConfig from 'config/app'; | ||||
| import { toXec } from 'wallet'; | import { toXec } from 'wallet'; | ||||
| import { FIRMA } from 'constants/tokens'; | import { FIRMA } from 'constants/tokens'; | ||||
| import { FIRMA_BALANCE_LABEL } from 'constants/tokenDisplayOverrides'; | |||||
| export const BalanceXec = styled.div` | export const BalanceXec = styled.div` | ||||
| display: flex; | display: flex; | ||||
| flex-direction: column; | flex-direction: column; | ||||
| font-size: var(--text-3xl); | font-size: var(--text-3xl); | ||||
| line-height: var(--text-3xl--line-height); | line-height: var(--text-3xl--line-height); | ||||
| margin-bottom: 0px; | margin-bottom: 0px; | ||||
| font-weight: bold; | font-weight: bold; | ||||
| ▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | return ( | ||||
| <a href={`#/token/${appConfig.vipTokens.xecx.tokenId}`}> | <a href={`#/token/${appConfig.vipTokens.xecx.tokenId}`}> | ||||
| XECX | XECX | ||||
| </a> | </a> | ||||
| </BalanceRow> | </BalanceRow> | ||||
| )} | )} | ||||
| {balanceFirma !== 0 && ( | {balanceFirma !== 0 && ( | ||||
| <BalanceRow | <BalanceRow | ||||
| isXecx | isXecx | ||||
| title="Balance FIRMA" | title={`Balance ${FIRMA_BALANCE_LABEL}`} | ||||
| hideBalance={settings.balanceVisible === false} | hideBalance={settings.balanceVisible === false} | ||||
| > | > | ||||
| {formattedBalanceFirma}{' '} | {formattedBalanceFirma}{' '} | ||||
| <a href={`#/token/${FIRMA.tokenId}`}>FIRMA</a> | <a href={`#/token/${FIRMA.tokenId}`}> | ||||
| {FIRMA_BALANCE_LABEL} | |||||
| </a> | |||||
| </BalanceRow> | </BalanceRow> | ||||
| )} | )} | ||||
| </BalanceXec> | </BalanceXec> | ||||
| {renderFiatValues && ( | {renderFiatValues && ( | ||||
| <> | <> | ||||
| <BalanceFiat | <BalanceFiat | ||||
| title="Balance in Local Currency" | title="Balance in Local Currency" | ||||
| balanceVisible={settings.balanceVisible === false} | balanceVisible={settings.balanceVisible === false} | ||||
| Show All 18 Lines | |||||