Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Wallet/Wallet.js
Show First 20 Lines • Show All 197 Lines • ▼ Show 20 Lines | return ( | ||||
<p style={{ color: 'red' }}> | <p style={{ color: 'red' }}> | ||||
<b>An error occured on our end.</b> | <b>An error occured on our end.</b> | ||||
<br></br> Re-establishing connection... | <br></br> Re-establishing connection... | ||||
</p> | </p> | ||||
<CashLoader /> | <CashLoader /> | ||||
</> | </> | ||||
)} | )} | ||||
{wallet && | |||||
((wallet.Path245 && wallet.Path145) || wallet.Path1899) && ( | |||||
<> | |||||
{wallet.Path1899 ? ( | |||||
<QRCode | |||||
id="borderedQRCode" | |||||
address={ | |||||
address === 'slpAddress' | |||||
? wallet.Path1899.slpAddress | |||||
: wallet.Path1899.cashAddress | |||||
} | |||||
/> | |||||
) : ( | |||||
<QRCode | <QRCode | ||||
id="borderedQRCode" | id="borderedQRCode" | ||||
address={ | address={ | ||||
address === 'slpAddress' | address === 'slpAddress' | ||||
? wallet.Path245.slpAddress | ? wallet.Path245.slpAddress | ||||
: wallet.Path145.cashAddress | : wallet.Path145.cashAddress | ||||
} | } | ||||
/> | /> | ||||
)} | |||||
</> | |||||
)} | |||||
<SwitchBtnCtn> | <SwitchBtnCtn> | ||||
<SwitchBtn | <SwitchBtn | ||||
onClick={() => handleChangeAddress()} | onClick={() => handleChangeAddress()} | ||||
className={ | className={ | ||||
address !== 'cashAddress' ? 'nonactiveBtn' : null | address !== 'cashAddress' ? 'nonactiveBtn' : null | ||||
} | } | ||||
> | > | ||||
{currency.ticker} | {currency.ticker} | ||||
</SwitchBtn> | </SwitchBtn> | ||||
<SwitchBtn | <SwitchBtn | ||||
onClick={() => handleChangeAddress()} | onClick={() => handleChangeAddress()} | ||||
className={ | className={ | ||||
address === 'cashAddress' ? 'nonactiveBtn' : 'slpActive' | address === 'cashAddress' ? 'nonactiveBtn' : 'slpActive' | ||||
} | } | ||||
> | > | ||||
{currency.tokenTicker} | {currency.tokenTicker} | ||||
</SwitchBtn> | </SwitchBtn> | ||||
</SwitchBtnCtn> | </SwitchBtnCtn> | ||||
{balances.totalBalance ? ( | {balances.totalBalance ? ( | ||||
<> | <> | ||||
<ExternalLink | <ExternalLink | ||||
href={`${currency.blockExplorerUrl}/address/${wallet.Path145.cashAddress}`} | href={`${currency.blockExplorerUrl}/address/${wallet.Path1899.cashAddress}`} | ||||
target="_blank" | target="_blank" | ||||
rel="noopener noreferrer" | rel="noopener noreferrer" | ||||
> | > | ||||
<LinkOutlined /> View Transactions | <LinkOutlined /> View Transactions | ||||
</ExternalLink> | </ExternalLink> | ||||
</> | </> | ||||
) : null} | ) : null} | ||||
</> | </> | ||||
Show All 24 Lines |