Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Send/SendToken.js
Show First 20 Lines • Show All 323 Lines • ▼ Show 20 Lines | return ( | ||||
handleSlpAmountChange(e), | handleSlpAmountChange(e), | ||||
required: true, | required: true, | ||||
value: formData.value, | value: formData.value, | ||||
}} | }} | ||||
/> | /> | ||||
<div style={{ paddingTop: '12px' }}> | <div style={{ paddingTop: '12px' }}> | ||||
{apiError || | {apiError || | ||||
sendTokenAmountError || | sendTokenAmountError || | ||||
sendTokenAddressError || | sendTokenAddressError ? ( | ||||
token.info.decimals === 9 ? ( | |||||
<> | <> | ||||
<SecondaryButton> | <SecondaryButton> | ||||
Send {token.info.tokenName} | Send {token.info.tokenName} | ||||
</SecondaryButton> | </SecondaryButton> | ||||
{apiError && <CashLoader />} | {apiError && <CashLoader />} | ||||
</> | </> | ||||
) : ( | ) : ( | ||||
<PrimaryButton | <PrimaryButton | ||||
onClick={() => submit()} | onClick={() => submit()} | ||||
> | > | ||||
Send {token.info.tokenName} | Send {token.info.tokenName} | ||||
</PrimaryButton> | </PrimaryButton> | ||||
)} | )} | ||||
</div> | </div> | ||||
{token.info.decimals === 9 && ( | |||||
<Alert | |||||
message={`Sending ${currency.tokenTicker} tokens with 9 decimal places is currently disabled.`} | |||||
type="warning" | |||||
showIcon | |||||
/> | |||||
)} | |||||
{queryStringText && ( | {queryStringText && ( | ||||
<Alert | <Alert | ||||
message={`You are sending a transaction to an address including query parameters "${queryStringText}." Token transactions do not support query parameters and they will be ignored.`} | message={`You are sending a transaction to an address including query parameters "${queryStringText}." Token transactions do not support query parameters and they will be ignored.`} | ||||
type="warning" | type="warning" | ||||
/> | /> | ||||
)} | )} | ||||
{apiError && ( | {apiError && ( | ||||
<p style={{ color: 'red' }}> | <p style={{ color: 'red' }}> | ||||
Show All 17 Lines |