Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Wallet/Wallet.js
import React from 'react'; | import React from 'react'; | ||||
import styled from 'styled-components'; | import styled from 'styled-components'; | ||||
import { WalletContext } from '@utils/context'; | import { WalletContext } from '@utils/context'; | ||||
import { OnBoarding } from '@components/OnBoarding/OnBoarding'; | import { OnBoarding } from '@components/OnBoarding/OnBoarding'; | ||||
import { QRCode } from '@components/Common/QRCode'; | import { QRCode } from '@components/Common/QRCode'; | ||||
import { currency } from '@components/Common/Ticker.js'; | import { currency } from '@components/Common/Ticker.js'; | ||||
import { Link } from 'react-router-dom'; | import { Link } from 'react-router-dom'; | ||||
import TokenList from './TokenList'; | import TokenList from './TokenList'; | ||||
import TxHistory from './TxHistory'; | import TxHistory from './TxHistory'; | ||||
import { CashLoader } from '@components/Common/CustomIcons'; | import { ApiError } from '@components/Common/ApiError'; | ||||
import { BalanceHeader } from '@components/Common/BalanceHeader'; | import { BalanceHeader } from '@components/Common/BalanceHeader'; | ||||
import { BalanceHeaderFiat } from '@components/Common/BalanceHeaderFiat'; | import { BalanceHeaderFiat } from '@components/Common/BalanceHeaderFiat'; | ||||
import { LoadingCtn, ZeroBalanceHeader } from '@components/Common/Atoms'; | import { LoadingCtn, ZeroBalanceHeader } from '@components/Common/Atoms'; | ||||
import { getWalletState } from '@utils/cashMethods'; | import { getWalletState } from '@utils/cashMethods'; | ||||
export const Tabs = styled.div` | export const Tabs = styled.div` | ||||
margin: auto; | margin: auto; | ||||
margin-bottom: 12px; | margin-bottom: 12px; | ||||
▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | return ( | ||||
<BalanceHeaderFiat | <BalanceHeaderFiat | ||||
balance={balances.totalBalance} | balance={balances.totalBalance} | ||||
settings={cashtabSettings} | settings={cashtabSettings} | ||||
fiatPrice={fiatPrice} | fiatPrice={fiatPrice} | ||||
/> | /> | ||||
)} | )} | ||||
</> | </> | ||||
)} | )} | ||||
{apiError && ( | {apiError && <ApiError />} | ||||
<> | |||||
<p style={{ color: 'red' }}> | |||||
<b>An error occurred on our end.</b> | |||||
<br></br> Re-establishing connection... | |||||
</p> | |||||
<CashLoader /> | |||||
</> | |||||
)} | |||||
{wallet && ((wallet.Path245 && wallet.Path145) || wallet.Path1899) && ( | {wallet && ((wallet.Path245 && wallet.Path145) || wallet.Path1899) && ( | ||||
<> | <> | ||||
{wallet.Path1899 ? ( | {wallet.Path1899 ? ( | ||||
<> | <> | ||||
<QRCode | <QRCode | ||||
id="borderedQRCode" | id="borderedQRCode" | ||||
address={ | address={ | ||||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |