Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Send/SendToken.js
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | const SendToken = ({ tokenId, jestBCH, passLoadingStatus }) => { | ||||
const [burnConfirmationValid, setBurnConfirmationValid] = useState(null); | const [burnConfirmationValid, setBurnConfirmationValid] = useState(null); | ||||
const [confirmationOfEtokenToBeBurnt, setConfirmationOfEtokenToBeBurnt] = | const [confirmationOfEtokenToBeBurnt, setConfirmationOfEtokenToBeBurnt] = | ||||
useState(''); | useState(''); | ||||
// Get device window width | // Get device window width | ||||
// If this is less than 769, the page will open with QR scanner open | // If this is less than 769, the page will open with QR scanner open | ||||
const { width } = useWindowDimensions(); | const { width } = useWindowDimensions(); | ||||
// Load with QR code open if device is mobile and NOT iOS + anything but safari | // Load with QR code open if device is mobile and NOT iOS + anything but safari | ||||
const scannerSupported = width < 769 && isMobile && !(isIOS && !isSafari); | const scannerSupported = | ||||
cashtabSettings && | |||||
cashtabSettings.autoCameraOn === true && | |||||
width < 769 && | |||||
isMobile && | |||||
!(isIOS && !isSafari); | |||||
const [isModalVisible, setIsModalVisible] = useState(false); | const [isModalVisible, setIsModalVisible] = useState(false); | ||||
const [formData, setFormData] = useState({ | const [formData, setFormData] = useState({ | ||||
value: '', | value: '', | ||||
address: '', | address: '', | ||||
}); | }); | ||||
const { getBCH, getRestUrl, sendToken, getTokenStats, burnEtoken } = | const { getBCH, getRestUrl, sendToken, getTokenStats, burnEtoken } = | ||||
▲ Show 20 Lines • Show All 608 Lines • Show Last 20 Lines |