Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Send/Send.js
import React, { useState, useEffect } from 'react'; | import React, { useState, useEffect } from 'react'; | ||||
import { useLocation } from 'react-router-dom'; | import { useLocation } from 'react-router-dom'; | ||||
import PropTypes from 'prop-types'; | import PropTypes from 'prop-types'; | ||||
import { WalletContext } from '@utils/context'; | import { WalletContext } from 'utils/context'; | ||||
import { | import { | ||||
AntdFormWrapper, | AntdFormWrapper, | ||||
SendBchInput, | SendBchInput, | ||||
DestinationAddressSingle, | DestinationAddressSingle, | ||||
DestinationAddressMulti, | DestinationAddressMulti, | ||||
} from '@components/Common/EnhancedInputs'; | } from 'components/Common/EnhancedInputs'; | ||||
import { AdvancedCollapse } from '@components/Common/StyledCollapse'; | import { AdvancedCollapse } from 'components/Common/StyledCollapse'; | ||||
import { Form, message, Modal, Alert, Collapse, Input, Button } from 'antd'; | import { Form, message, Modal, Alert, Collapse, Input, Button } from 'antd'; | ||||
const { Panel } = Collapse; | |||||
const { TextArea } = Input; | |||||
import { Row, Col, Switch } from 'antd'; | import { Row, Col, Switch } from 'antd'; | ||||
import PrimaryButton, { | import PrimaryButton, { | ||||
SecondaryButton, | SecondaryButton, | ||||
SmartButton, | SmartButton, | ||||
} from '@components/Common/PrimaryButton'; | } from 'components/Common/PrimaryButton'; | ||||
import useBCH from '@hooks/useBCH'; | import useBCH from 'hooks/useBCH'; | ||||
import useWindowDimensions from '@hooks/useWindowDimensions'; | import useWindowDimensions from 'hooks/useWindowDimensions'; | ||||
import { | import { | ||||
sendXecNotification, | sendXecNotification, | ||||
errorNotification, | errorNotification, | ||||
messageSignedNotification, | messageSignedNotification, | ||||
} from '@components/Common/Notifications'; | } from 'components/Common/Notifications'; | ||||
import { isMobile, isIOS, isSafari } from 'react-device-detect'; | import { isMobile, isIOS, isSafari } from 'react-device-detect'; | ||||
import { currency, parseAddressForParams } from '@components/Common/Ticker.js'; | import { currency, parseAddressForParams } from 'components/Common/Ticker.js'; | ||||
import { Event } from '@utils/GoogleAnalytics'; | import { Event } from 'utils/GoogleAnalytics'; | ||||
import { | import { | ||||
fiatToCrypto, | fiatToCrypto, | ||||
shouldRejectAmountInput, | shouldRejectAmountInput, | ||||
isValidXecAddress, | isValidXecAddress, | ||||
isValidEtokenAddress, | isValidEtokenAddress, | ||||
isValidXecSendAmount, | isValidXecSendAmount, | ||||
} from '@utils/validation'; | } from 'utils/validation'; | ||||
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 { | import { | ||||
ZeroBalanceHeader, | ZeroBalanceHeader, | ||||
ConvertAmount, | ConvertAmount, | ||||
AlertMsg, | AlertMsg, | ||||
WalletInfoCtn, | WalletInfoCtn, | ||||
SidePaddingCtn, | SidePaddingCtn, | ||||
FormLabel, | FormLabel, | ||||
} from '@components/Common/Atoms'; | } from 'components/Common/Atoms'; | ||||
import { | import { | ||||
getWalletState, | getWalletState, | ||||
convertToEcashPrefix, | convertToEcashPrefix, | ||||
toLegacyCash, | toLegacyCash, | ||||
toLegacyCashArray, | toLegacyCashArray, | ||||
fromSmallestDenomination, | fromSmallestDenomination, | ||||
} from '@utils/cashMethods'; | } from 'utils/cashMethods'; | ||||
import ApiError from '@components/Common/ApiError'; | import ApiError from 'components/Common/ApiError'; | ||||
import { formatFiatBalance, formatBalance } from '@utils/formatting'; | import { formatFiatBalance, formatBalance } from 'utils/formatting'; | ||||
import { TokenParamLabel } from '@components/Common/Atoms'; | import { TokenParamLabel } from 'components/Common/Atoms'; | ||||
import { PlusSquareOutlined } from '@ant-design/icons'; | import { PlusSquareOutlined } from '@ant-design/icons'; | ||||
import styled from 'styled-components'; | import styled from 'styled-components'; | ||||
import { CopyToClipboard } from 'react-copy-to-clipboard'; | import { CopyToClipboard } from 'react-copy-to-clipboard'; | ||||
import WalletLabel from '@components/Common/WalletLabel.js'; | import WalletLabel from 'components/Common/WalletLabel.js'; | ||||
const { Panel } = Collapse; | |||||
const { TextArea } = Input; | |||||
const SignMessageLabel = styled.div` | const SignMessageLabel = styled.div` | ||||
text-align: left; | text-align: left; | ||||
color: ${props => props.theme.forms.text}; | color: ${props => props.theme.forms.text}; | ||||
`; | `; | ||||
const TextAreaLabel = styled.div` | const TextAreaLabel = styled.div` | ||||
text-align: left; | text-align: left; | ||||
▲ Show 20 Lines • Show All 989 Lines • Show Last 20 Lines |