diff --git a/locales/base/translation.json b/locales/base/translation.json index f10822d6f5a..97c136527d1 100644 --- a/locales/base/translation.json +++ b/locales/base/translation.json @@ -928,7 +928,7 @@ "header": "Restore wallet", "title": "Enter your recovery phrase", "description": "Use the 12 or 24-word phrase that you saved when you set up your wallet to restore.", - "description_v1_89": "Your Recovery Phrase is a 12 or 24-word phrase that you wrote down and saved when you set up your wallet. Please enter it here to restore your wallet.", + "description_V1_89": "Your Recovery Phrase is a 12 or 24-word phrase that you wrote down and saved when you set up your wallet. Please enter it here to restore your wallet.", "emptyWalletDialog": { "description": "This wallet doesn’t have any funds. Would you still like to use it?", "action": "Use Wallet", diff --git a/src/components/ClipboardAwarePasteButton.tsx b/src/components/ClipboardAwarePasteButton.tsx index 338556ce98b..2a737277249 100644 --- a/src/components/ClipboardAwarePasteButton.tsx +++ b/src/components/ClipboardAwarePasteButton.tsx @@ -1,16 +1,10 @@ -import { debounce } from 'lodash' import React, { useLayoutEffect } from 'react' import { useTranslation } from 'react-i18next' import { LayoutAnimation, Platform, StyleSheet, Text, View } from 'react-native' import Touchable from 'src/components/Touchable' import colors from 'src/styles/colors' import { typeScale } from 'src/styles/fonts' - -const BUTTON_TAP_DEBOUNCE_TIME = 300 // milliseconds -const DEBOUNCE_OPTIONS = { - leading: true, - trailing: false, -} +import { Spacing } from 'src/styles/styles' interface Props { getClipboardContent: () => Promise @@ -39,54 +33,36 @@ export default React.memo(function ClipboardAwarePasteButton({ return null } - // Debounce onPress event so that it is called once on trigger and - // consecutive calls in given period are ignored. - const debouncedOnPress = debounce( - async () => { - await onPressInternal() - }, - BUTTON_TAP_DEBOUNCE_TIME, - DEBOUNCE_OPTIONS - ) - return ( - {/* these Views cannot be combined as it will cause ripple to not respect the border radius */} - - - <> - - {t('paste')} - - - - + + <> + + {t('paste')} + + + ) }) const styles = StyleSheet.create({ - // on android Touchable Provides a ripple effect, by itself it does not respect the border radius on Touchable - containRipple: { - overflow: 'hidden', - }, container: { flexDirection: 'column', + overflow: 'hidden', }, button: { alignItems: 'center', justifyContent: 'center', paddingVertical: 5, - paddingHorizontal: 24, + paddingHorizontal: Spacing.Thick24, backgroundColor: colors.white, flexDirection: 'row', - height: 48, + height: Spacing.XLarge48, flexGrow: 1, }, fontStyle: { ...typeScale.labelSemiBoldMedium, color: colors.black, - marginLeft: 0, - marginRight: 0, }, }) diff --git a/src/components/RecoveryPhraseInput.tsx b/src/components/RecoveryPhraseInput.tsx index 4665dc9f364..5c29e13a952 100644 --- a/src/components/RecoveryPhraseInput.tsx +++ b/src/components/RecoveryPhraseInput.tsx @@ -9,6 +9,7 @@ import { Text, View, } from 'react-native' +import { isValidBackupPhrase } from 'src/backup/utils' import Card from 'src/components/Card' import ClipboardAwarePasteButton from 'src/components/ClipboardAwarePasteButton' import TextInput, { LINE_HEIGHT } from 'src/components/TextInput' @@ -68,8 +69,8 @@ export default function RecoveryPhraseInput({ return ( {/* These views cannot be combined as it will cause the shadow to be clipped on iOS */} diff --git a/src/import/ImportWallet.tsx b/src/import/ImportWallet.tsx index e5fbbff40d7..edb21507719 100644 --- a/src/import/ImportWallet.tsx +++ b/src/import/ImportWallet.tsx @@ -207,7 +207,7 @@ function ImportWallet({ navigation, route }: Props) { onInputChange={formatAndSetBackupPhrase} shouldShowClipboard={shouldShowClipboard} /> - {t('importExistingKey.description_v1_89')} + {t('importExistingKey.description_V1_89')}