diff --git a/apps/wallet-mobile/.storybook/storybook.requires.js b/apps/wallet-mobile/.storybook/storybook.requires.js index ff0fedbe44..2aedd61bb7 100644 --- a/apps/wallet-mobile/.storybook/storybook.requires.js +++ b/apps/wallet-mobile/.storybook/storybook.requires.js @@ -126,8 +126,9 @@ const getStories = () => { "./src/features/Send/useCases/ListAmountsToSend/EditAmount/EditAmountScreen.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/EditAmount/EditAmountScreen.stories.tsx"), "./src/features/Send/useCases/ListAmountsToSend/ListAmountsToSendScreen.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/ListAmountsToSendScreen.stories.tsx"), "./src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.stories.tsx"), - "./src/features/Send/useCases/StartMultiTokenTx/SelectAddressByNameServer/SelectAddressByNameServer.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/SelectAddressByNameServer/SelectAddressByNameServer.stories.tsx"), - "./src/features/Send/useCases/StartMultiTokenTx/ShowSupportedResolverServices/ShowSupportedResolverServices.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/ShowSupportedResolverServices/ShowSupportedResolverServices.stories.tsx"), + "./src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.stories.tsx"), + "./src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.stories.tsx"), + "./src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.stories.tsx"), "./src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.stories.tsx"), "./src/features/Settings/About/About.stories.tsx": require("../src/features/Settings/About/About.stories.tsx"), "./src/features/Settings/ApplicationSettings/ApplicationSettingsScreen.stories.tsx": require("../src/features/Settings/ApplicationSettings/ApplicationSettingsScreen.stories.tsx"), diff --git a/apps/wallet-mobile/src/WalletInit/WalletForm.tsx b/apps/wallet-mobile/src/WalletInit/WalletForm.tsx index e3d4e0d515..f4ac2f7e19 100644 --- a/apps/wallet-mobile/src/WalletInit/WalletForm.tsx +++ b/apps/wallet-mobile/src/WalletInit/WalletForm.tsx @@ -80,7 +80,7 @@ export const WalletForm = ({onSubmit}: Props) => { onChangeText={setPassword} errorText={passwordErrorText} returnKeyType="next" - helperText={strings.passwordStrengthRequirement({ + helper={strings.passwordStrengthRequirement({ requiredPasswordLength: REQUIRED_PASSWORD_LENGTH, })} right={!passwordErrors.passwordIsWeak ? : undefined} diff --git a/apps/wallet-mobile/src/components/TextInput/TextInput.stories.tsx b/apps/wallet-mobile/src/components/TextInput/TextInput.stories.tsx index c52c9ba895..7b862596b6 100644 --- a/apps/wallet-mobile/src/components/TextInput/TextInput.stories.tsx +++ b/apps/wallet-mobile/src/components/TextInput/TextInput.stories.tsx @@ -83,7 +83,7 @@ storiesOf('TextInput', module) autoFocus label="with helper text" onChangeText={action('onChangeText')} - helperText="This is what helper text looks like" + helper="This is what helper text looks like" autoComplete="off" /> )) @@ -92,7 +92,7 @@ storiesOf('TextInput', module) autoFocus label="with helper text and error text" onChangeText={action('onChangeText')} - helperText="This is what helper text looks like" + helper="This is what helper text looks like" errorText="This is what an error looks likes" autoComplete="off" /> diff --git a/apps/wallet-mobile/src/components/TextInput/TextInput.tsx b/apps/wallet-mobile/src/components/TextInput/TextInput.tsx index a9bc3c4796..fb83082289 100644 --- a/apps/wallet-mobile/src/components/TextInput/TextInput.tsx +++ b/apps/wallet-mobile/src/components/TextInput/TextInput.tsx @@ -1,3 +1,4 @@ +import {isString} from '@yoroi/common' import React, {ForwardedRef} from 'react' import { StyleSheet, @@ -18,7 +19,7 @@ export type TextInputProps = RNTextInputProps & Omit, 'theme'> & { containerStyle?: ViewStyle renderComponentStyle?: ViewStyle - helperText?: string + helper?: string | React.ReactNode errorText?: string disabled?: boolean errorOnMount?: boolean @@ -52,7 +53,7 @@ export const TextInput = React.forwardRef((props: TextInputProps, ref: Forwarded containerStyle, renderComponentStyle, secureTextEntry, - helperText, + helper, errorText, errorOnMount, errorDelay, @@ -75,6 +76,20 @@ export const TextInput = React.forwardRef((props: TextInputProps, ref: Forwarded value, errorDelay, ) + const showError = errorTextEnabled && !isEmptyString(errorText) + const showHelperComponent = helper != null && !isString(helper) + + const helperToShow = showError ? ( + + {errorText} + + ) : showHelperComponent ? ( + helper + ) : ( + + {helper} + + ) return ( @@ -129,11 +144,7 @@ export const TextInput = React.forwardRef((props: TextInputProps, ref: Forwarded {...restProps} /> - {!noHelper && ( - - {errorTextEnabled && !isEmptyString(errorText) ? errorText : helperText} - - )} + {!noHelper && helperToShow} ) }) @@ -151,6 +162,7 @@ export const HelperText = ({ visible?: boolean }) => ( { - const handleActive = (label: string) => { - action(`onSelect ${label}`) + const handleActive = (index: number, label: string) => { + action(`onSelect ${index}:${label}`) } return ( @@ -17,8 +17,8 @@ const WithInitial = ({initial}: {initial: number}) => { } const NoInitial = () => { - const handleActive = (label: string) => { - action(`onSelect ${label}`) + const handleActive = (index: number, label: string) => { + action(`onSelect ${index}:${label}`) } return ( diff --git a/apps/wallet-mobile/src/features/Send/common/SendContext.tsx b/apps/wallet-mobile/src/features/Send/common/SendContext.tsx index 505efdbf0c..213b6fd279 100644 --- a/apps/wallet-mobile/src/features/Send/common/SendContext.tsx +++ b/apps/wallet-mobile/src/features/Send/common/SendContext.tsx @@ -186,7 +186,7 @@ const targetsReducer = (state: SendState, action: TargetAction) => { if (addressRecords !== undefined) { const keys = Object.keys(addressRecords).filter(isNameServer) const nameServer = keys.length === 1 ? keys[0] : undefined - target.receiver.selectedNameServer =nameServer + target.receiver.selectedNameServer = nameServer if (nameServer !== undefined) { target.entry.address = addressRecords[nameServer] ?? '' } @@ -273,7 +273,7 @@ export const initialState: SendState = { }, }, ], -} +} export const useTokenQuantities = (tokenId: string) => { const wallet = useSelectedWallet() diff --git a/apps/wallet-mobile/src/features/Send/common/constants.ts b/apps/wallet-mobile/src/features/Send/common/constants.ts new file mode 100644 index 0000000000..26052c2a1a --- /dev/null +++ b/apps/wallet-mobile/src/features/Send/common/constants.ts @@ -0,0 +1 @@ +export const memoMaxLenght = 256 diff --git a/apps/wallet-mobile/src/features/Send/common/errors.ts b/apps/wallet-mobile/src/features/Send/common/errors.ts new file mode 100644 index 0000000000..f2afcd1285 --- /dev/null +++ b/apps/wallet-mobile/src/features/Send/common/errors.ts @@ -0,0 +1,2 @@ +export class AddressErrorWrongNetwork extends Error {} +export class AddressErrorInvalid extends Error {} diff --git a/apps/wallet-mobile/src/features/Send/common/strings.ts b/apps/wallet-mobile/src/features/Send/common/strings.ts index ce256be86d..2d6565561e 100644 --- a/apps/wallet-mobile/src/features/Send/common/strings.ts +++ b/apps/wallet-mobile/src/features/Send/common/strings.ts @@ -6,8 +6,6 @@ export const useStrings = () => { const intl = useIntl() return { - addressInputErrorInvalidAddress: intl.formatMessage(messages.addressInputErrorInvalidAddress), - addressInputErrorInvalidDomain: intl.formatMessage(messages.addressInputErrorInvalidDomain), addressInputLabel: intl.formatMessage(messages.addressInputLabel), addressReaderQrText: intl.formatMessage(messages.addressReaderQrText), all: intl.formatMessage(globalMessages.all), @@ -36,8 +34,14 @@ export const useStrings = () => { feeLabel: intl.formatMessage(messages.feeLabel), feeNotAvailable: intl.formatMessage(messages.feeNotAvailable), found: intl.formatMessage(messages.found), + helperAddressErrorInvalid: intl.formatMessage(messages.helperAddressErrorInvalid), + helperAddressErrorWrongNetwork: intl.formatMessage(messages.helperAddressErrorWrongNetwork), + helperMemoErrorTooLong: intl.formatMessage(messages.helperMemoErrorTooLong), + helperMemoInstructions: intl.formatMessage(messages.helperMemoInstructions), + helperResolverErrorUnsupportedDomain: intl.formatMessage(messages.helperResolverErrorUnsupportedDomain), manyNameServersWarning: intl.formatMessage(messages.manyNameServersWarning), max: intl.formatMessage(globalMessages.max), + memoLabel: intl.formatMessage(messages.memoLabel), minPrimaryBalanceForTokens: intl.formatMessage(amountInputErrorMessages.minPrimaryBalanceForTokens), next: intl.formatMessage(globalMessages.next), nfts: (qty: number) => intl.formatMessage(globalMessages.nfts, {qty}), @@ -279,7 +283,31 @@ export const messages = defineMessages({ defaultMessage: '!!!Yoroi Supports Name Resolution', }, manyNameServersWarning: { - id: 'send.resolver.manyNameServersWarning', + id: 'send.warning.resolver.manyNameServers', defaultMessage: '!!!Multiple name servers found. Please select one.', }, + helperAddressErrorInvalid: { + id: 'send.helper.addressError.invalid', + defaultMessage: '!!!Please enter valid address', + }, + helperAddressErrorWrongNetwork: { + id: 'send.helper.addressError.wrongNetwork', + defaultMessage: '!!!Please enter valid domain', + }, + helperResolverErrorUnsupportedDomain: { + id: 'send.helper.resolverError.unsupportedDomain', + defaultMessage: '!!!Domain is not supported', + }, + memoLabel: { + id: 'components.send.memofield.label', + defaultMessage: '!!!Memo', + }, + helperMemoInstructions: { + id: 'components.send.memofield.message', + defaultMessage: '!!!(Optional) Memo is stored locally', + }, + helperMemoErrorTooLong: { + id: 'components.send.memofield.error', + defaultMessage: '!!!Memo is too long', + }, }) diff --git a/apps/wallet-mobile/src/features/Send/common/useSendAddress.tsx b/apps/wallet-mobile/src/features/Send/common/useSendAddress.tsx index f2b6e5f2af..86d2974f25 100644 --- a/apps/wallet-mobile/src/features/Send/common/useSendAddress.tsx +++ b/apps/wallet-mobile/src/features/Send/common/useSendAddress.tsx @@ -3,6 +3,7 @@ import {useQuery, UseQueryOptions} from 'react-query' import {useSelectedWallet} from '../../../SelectedWallet' import {normalizeToAddress, toCardanoNetworkId} from '../../../yoroi-wallets/cardano/utils' +import {AddressErrorInvalid, AddressErrorWrongNetwork} from './errors' import {useSend} from './SendContext' export const useSendAddress = () => { @@ -58,10 +59,10 @@ const useValidateAddress = ( // NOTE: should be a wallet function from address manager const validateAddress = async (address: string, chainId: number) => { const chainAddress = await normalizeToAddress(address) - if (!chainAddress) throw new Error('Invalid address') + if (!chainAddress) throw new AddressErrorInvalid() const chainAddressChainId = await chainAddress.networkId() - if (chainAddressChainId !== chainId) throw new Error('Wrong network') + if (chainAddressChainId !== chainId) throw new AddressErrorWrongNetwork() return true } diff --git a/apps/wallet-mobile/src/features/Send/common/useSendInputReceiver.tsx b/apps/wallet-mobile/src/features/Send/common/useSendReceiver.tsx similarity index 81% rename from apps/wallet-mobile/src/features/Send/common/useSendInputReceiver.tsx rename to apps/wallet-mobile/src/features/Send/common/useSendReceiver.tsx index a6859a672e..f07f3e50d6 100644 --- a/apps/wallet-mobile/src/features/Send/common/useSendInputReceiver.tsx +++ b/apps/wallet-mobile/src/features/Send/common/useSendReceiver.tsx @@ -1,4 +1,4 @@ -import {isNameServer, useResolverCryptoAddresses} from '@yoroi/resolver' +import {isDomain, isNameServer, isResolvableDomain, useResolverCryptoAddresses} from '@yoroi/resolver' import {Resolver} from '@yoroi/types' import * as React from 'react' import {useQueryClient} from 'react-query' @@ -6,11 +6,12 @@ import {useQueryClient} from 'react-query' import {debounceMaker} from '../../../utils/debounceMaker' import {useSend} from './SendContext' -export const useSendInputReceiver = () => { +export const useSendReceiver = () => { const queryClient = useQueryClient() const {targets, selectedTargetIndex, receiverResolveChanged, addressRecordsFetched} = useSend() const receiver = targets[selectedTargetIndex].receiver + const isUnsupportedDomain = !isResolvableDomain(receiver.resolve) && isDomain(receiver.resolve) const { error: receiverError, @@ -59,18 +60,13 @@ export const useSendInputReceiver = () => { }, undefined, ) - // TODO: revisit - // addressRecordsFetched(records) - console.log(records) - addressRecordsFetched({ - handle: 'addr1vxggvx6uq9mtf6e0tyda2mahg84w8azngpvkwr5808ey6qsy2ww7d', - cns: 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', - }) + addressRecordsFetched(records) } }, [addressRecordsFetched, cryptoAddresses, isSuccess]) return { isResolvingAddressess, + isUnsupportedDomain, receiverError, } } diff --git a/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/ConfirmTxScreen.tsx b/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/ConfirmTxScreen.tsx index b9cdd340f6..6878416823 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/ConfirmTxScreen.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/ConfirmTxScreen.tsx @@ -85,8 +85,7 @@ export const ConfirmTxScreen = () => { {targets.map((target, index) => ( - // TODO: revisit - + ))} @@ -103,15 +102,13 @@ export const ConfirmTxScreen = () => { {!wallet.isEasyConfirmationEnabled && !wallet.isHW && ( - <> - - + )} diff --git a/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/Summary/ReceiverInfo.tsx b/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/Summary/ReceiverInfo.tsx index ec3ec4f9dc..28639c8196 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/Summary/ReceiverInfo.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/Summary/ReceiverInfo.tsx @@ -1,22 +1,18 @@ +import {nameServerName} from '@yoroi/resolver' import * as React from 'react' import {View} from 'react-native' import {Spacer} from '../../../../../components/Spacer' import {Text} from '../../../../../components/Text' +import {YoroiTarget} from '../../../../../yoroi-wallets/types' import {useStrings} from '../../../common/strings' -// import {Service} from '../../StartMultiTokenTx/InputReceiver/ResolveAddress' type Props = { - receiver: string + target: YoroiTarget } -export const ReceiverInfo = ({receiver}: Props) => { +export const ReceiverInfo = ({target}: Props) => { const strings = useStrings() - - // const {resolvedAddressSelected} = useResolver() - - // TODO: revisit - const isResolved = true - // !isEmptyString(resolvedAddressSelected?.address) && !isEmptyString(resolvedAddressSelected?.service) + const {receiver, entry} = target return ( @@ -24,14 +20,14 @@ export const ReceiverInfo = ({receiver}: Props) => { - {isResolved ? ( + {target.receiver.as === 'domain' ? ( <> - {/* {Service[resolvedAddressSelected?.service ?? ''] ?? ''}: */} + {receiver.selectedNameServer ? nameServerName[receiver.selectedNameServer] : ''}: - {receiver} + {receiver.resolve} @@ -40,10 +36,10 @@ export const ReceiverInfo = ({receiver}: Props) => { - {/* {resolvedAddressSelected?.address} */} + {entry.address} ) : ( - {receiver} + {entry.address} )} ) diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo.tsx deleted file mode 100644 index 9c1f71bba0..0000000000 --- a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import React from 'react' -import {defineMessages, useIntl} from 'react-intl' -import {StyleSheet, Text, View} from 'react-native' - -import {HelperText, TextInput} from '../../../../components' - -export const maxMemoLength = 256 - -type Props = { - memo: string - onChangeText: (memo: string) => void -} - -export const InputMemo = ({onChangeText, memo}: Props) => { - const strings = useStrings() - - const showError = memo.length > maxMemoLength - - return ( - - onChangeText(memo)} - label={strings.label} - autoComplete="off" - testID="memoFieldInput" - errorText={showError ? 'error' : undefined} // to show the error styling - renderComponentStyle={styles.input} - noHelper - multiline - focusable - /> - - - - - - - - ) -} - -const Message = ({showError}: {showError: boolean}) => { - const strings = useStrings() - return {showError ? strings.error : strings.message} -} - -const LengthCounter = ({memo, showError}: {memo: string; showError: boolean}) => { - return ( - - {`${memo.length}/${maxMemoLength}`} - - ) -} - -const useStrings = () => { - const intl = useIntl() - - return { - label: intl.formatMessage(messages.label), - message: intl.formatMessage(messages.message), - error: intl.formatMessage(messages.error), - } -} - -export const messages = defineMessages({ - label: { - id: 'components.send.memofield.label', - defaultMessage: '!!!Memo', - }, - message: { - id: 'components.send.memofield.message', - defaultMessage: '!!!(Optional) Memo is stored locally', - }, - error: { - id: 'components.send.memofield.error', - defaultMessage: '!!!Memo is too long', - }, -}) - -const styles = StyleSheet.create({ - container: { - paddingBottom: 25, - }, - helper: { - flexDirection: 'row', - justifyContent: 'space-between', - }, - input: { - maxHeight: 80, - }, -}) diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo/InputMemo.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo/InputMemo.tsx new file mode 100644 index 0000000000..152037f4e3 --- /dev/null +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo/InputMemo.tsx @@ -0,0 +1,32 @@ +import React from 'react' +import {StyleSheet} from 'react-native' + +import {TextInput, TextInputProps} from '../../../../../components' +import {useStrings} from '../../../common/strings' +import {ShowMemoErrorTooLong} from './ShowMemoErrorTooLong' +import {ShowMemoInstructions} from './ShowMemoInstructions' + +export const InputMemo = ({isValid, value, ...props}: {isValid?: boolean} & TextInputProps) => { + const strings = useStrings() + + return ( + : } + {...props} + /> + ) +} + +const styles = StyleSheet.create({ + input: { + maxHeight: 80, + }, +}) diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo/ShowMemoErrorTooLong.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo/ShowMemoErrorTooLong.tsx new file mode 100644 index 0000000000..c8c7be3bb6 --- /dev/null +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo/ShowMemoErrorTooLong.tsx @@ -0,0 +1,27 @@ +import * as React from 'react' +import {StyleSheet, View} from 'react-native' + +import {HelperText} from '../../../../../components' +import {memoMaxLenght} from '../../../common/constants' +import {useStrings} from '../../../common/strings' + +export const ShowMemoErrorTooLong = ({memo = ''}: {memo?: string}) => { + const strings = useStrings() + + const lenghtInfo = `${memo.length}/${memoMaxLenght}` + + return ( + + {strings.helperMemoErrorTooLong} + + {lenghtInfo} + + ) +} + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + justifyContent: 'space-between', + }, +}) diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo/ShowMemoInstructions.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo/ShowMemoInstructions.tsx new file mode 100644 index 0000000000..d75cd4d995 --- /dev/null +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputMemo/ShowMemoInstructions.tsx @@ -0,0 +1,27 @@ +import * as React from 'react' +import {StyleSheet, View} from 'react-native' + +import {HelperText} from '../../../../../components' +import {memoMaxLenght} from '../../../common/constants' +import {useStrings} from '../../../common/strings' + +export const ShowMemoInstructions = ({memo = ''}: {memo?: string}) => { + const strings = useStrings() + + const lenghtInfo = `${memo.length}/${memoMaxLenght}` + + return ( + + {strings.helperMemoInstructions} + + {lenghtInfo} + + ) +} + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + justifyContent: 'space-between', + }, +}) diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.stories.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.stories.tsx index 9282a20241..5342ebbc5d 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.stories.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.stories.tsx @@ -22,16 +22,14 @@ storiesOf('Send InputReceiver', module) }, }) const resolverStorage = resolverStorageMaker() - const resolverManager= resolverManagerMaker(resolverStorage, resolverApi) + const resolverManager = resolverManagerMaker(resolverStorage, resolverApi) return ( - - {story()} - + {story()} diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.tsx index af7681e70c..ba859dd972 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.tsx @@ -5,6 +5,7 @@ import {Icon, TextInput, TextInputProps} from '../../../../../components' import {useNavigateTo} from '../../../common/navigation' import {ScannerButton} from '../../../common/ScannerButton' import {useStrings} from '../../../common/strings' +import {ShowResolvedAddressSelected} from './ShowResolvedAddressSelected' export const InputReceiver = ({ isLoading, @@ -34,6 +35,7 @@ export const InputReceiver = ({ showErrorOnBlur multiline blurOnSubmit + helper={} {...props} /> ) diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ResolveAddress.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ResolveAddress.tsx deleted file mode 100644 index 046ddb8643..0000000000 --- a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ResolveAddress.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import {nameServerName} from '@yoroi/resolver' -import React from 'react' -import {StyleSheet, Text, View, ViewProps} from 'react-native' - -import {HelperText, Spacer} from '../../../../../components' -import {isEmptyString} from '../../../../../utils' -import {useStrings} from '../../../common/strings' -import {InputReceiver} from './InputReceiver' - -type ReceiverProps = ViewProps & { - receiver: string - errorMessage: string - isLoading: boolean - isValid: boolean -} -export const ResolveAddress = ({isLoading, receiver, errorMessage, isValid, style, ...props}: ReceiverProps) => { - // const {resolvedAddressSelected} = useResolver() - const isError = errorMessage.length > 0 - // const selectedAddress = resolvedAddressSelected?.address ?? '' - // const selectedSevice = resolvedAddressSelected?.service ?? '' - // const isResolved = !isLoading && !isEmptyString(selectedAddress) && !isEmptyString(selectedSevice) - const _isResolved = false - const [, setInputText] = React.useState(receiver) - // const handleOnChangeText = (text: string) => { - // setInputText(text) - // } - - return ( - - - - {!isEmptyString(errorMessage) && ( - - {errorMessage} - - )} - - {/* {isResolved && } */} - - ) -} - -const _ResolvedAddress = ({address, service}: {address: string; service: string}) => { - const strings = useStrings() - const {firstHalf, secondHalf} = React.useMemo(() => { - const firstHalf = address.substring(0, 8) - const secondHalf = address.substring(address.length - 8) - - return { - firstHalf, - secondHalf, - } - }, [address]) - return ( - <> - - - - {`${nameServerName[service]}`} - - {`${strings.resolvedAddress}: ${firstHalf}...${secondHalf}`} - - - ) -} - -const styles = StyleSheet.create({ - resolvedAddressContainer: { - flexDirection: 'row', - justifyContent: 'space-between', - }, - resolvedAddressService: { - fontFamily: 'Rubik', - fontSize: 12, - fontWeight: '400', - color: '#4A5065', - }, - resolvedAddress: { - fontFamily: 'Rubik', - fontSize: 12, - fontWeight: '400', - color: '#8A92A3', - }, -}) diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.stories.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.stories.tsx new file mode 100644 index 0000000000..3577a98472 --- /dev/null +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.stories.tsx @@ -0,0 +1,114 @@ +import {storiesOf} from '@storybook/react-native' +import {resolverApiMaker, resolverManagerMaker, ResolverProvider, resolverStorageMaker} from '@yoroi/resolver' +import {Resolver} from '@yoroi/types' +import * as React from 'react' + +import {QueryProvider} from '../../../../../../.storybook/decorators' +import {Boundary} from '../../../../../components' +import {SelectedWalletProvider} from '../../../../../SelectedWallet' +import {YoroiWallet} from '../../../../../yoroi-wallets/cardano/types' +import {mocks as walletMocks} from '../../../../../yoroi-wallets/mocks/wallet' +import {initialState, SendProvider, SendState} from '../../../common/SendContext' +import {ShowResolvedAddressSelected} from './ShowResolvedAddressSelected' + +storiesOf('Send ShowResolvedAddressSelected', module) + .addDecorator((story) => { + const wallet: YoroiWallet = walletMocks.wallet + + return ( + + {story()} + + ) + }) + .add('handle', () => ) + .add('cns', () => ) + .add('unstoppable', () => ) + +const Wrapper = ({ns}: {ns: Partial}) => { + const resolverApi = resolverApiMaker({ + apiConfig: { + [Resolver.NameServer.Unstoppable]: { + apiKey: 'apiKey', + }, + }, + }) + const resolverStorage = resolverStorageMaker() + const resolverManager = resolverManagerMaker(resolverStorage, resolverApi) + + return ( + + + + + + + + ) +} + +const handle: SendState = { + ...initialState, + targets: [ + { + entry: {address: 'addr1vxggvx6uq9mtf6e0tyda2mahg84w8azngpvkwr5808ey6qsy2ww7d', amounts: {'': '1000000'}}, + receiver: { + as: 'domain', + resolve: '$stackchain', + selectedNameServer: Resolver.NameServer.Handle, + addressRecords: { + handle: 'addr1vxggvx6uq9mtf6e0tyda2mahg84w8azngpvkwr5808ey6qsy2ww7d', + cns: 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', + unstoppable: + 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', + }, + }, + }, + ], +} +const cns: SendState = { + ...initialState, + targets: [ + { + entry: { + address: + 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', + amounts: {'': '1000000'}, + }, + receiver: { + as: 'domain', + resolve: '$stackchain', + selectedNameServer: Resolver.NameServer.Cns, + addressRecords: { + handle: 'addr1vxggvx6uq9mtf6e0tyda2mahg84w8azngpvkwr5808ey6qsy2ww7d', + cns: 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', + unstoppable: + 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', + }, + }, + }, + ], +} +const unstoppable: SendState = { + ...initialState, + targets: [ + { + entry: { + address: + 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', + amounts: {'': '1000000'}, + }, + receiver: { + as: 'domain', + resolve: '$stackchain', + selectedNameServer: Resolver.NameServer.Unstoppable, + addressRecords: { + handle: 'addr1vxggvx6uq9mtf6e0tyda2mahg84w8azngpvkwr5808ey6qsy2ww7d', + cns: 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', + unstoppable: + 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', + }, + }, + }, + ], +} diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.tsx new file mode 100644 index 0000000000..fac5a1e683 --- /dev/null +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.tsx @@ -0,0 +1,64 @@ +import {nameServerName} from '@yoroi/resolver' +import React from 'react' +import {StyleSheet, Text, View} from 'react-native' + +import {Spacer} from '../../../../../components' +import {useSend} from '../../../common/SendContext' +import {useStrings} from '../../../common/strings' + +export const ShowResolvedAddressSelected = () => { + const strings = useStrings() + const {targets, selectedTargetIndex} = useSend() + const {selectedNameServer} = targets[selectedTargetIndex].receiver + const {address} = targets[selectedTargetIndex].entry + + const hide = address.length === 0 || selectedNameServer == null + + if (hide) return null + + const serverName = nameServerName[selectedNameServer] + const shortenAddress = shortenString(address) + const resolvedAddressInfo = `${strings.resolvedAddress}: ${shortenAddress}` + + return ( + + + + + + {serverName} + + + + {resolvedAddressInfo} + + + + ) +} + +const shortenString = (text: string) => { + if (text.length > 16) { + return text.substring(0, 8) + '...' + text.substring(text.length - 8) + } + return text +} + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + justifyContent: 'space-between', + }, + serverName: { + fontFamily: 'Rubik', + fontSize: 12, + fontWeight: '400', + color: '#4A5065', + }, + address: { + fontFamily: 'Rubik', + fontSize: 12, + fontWeight: '400', + color: '#8A92A3', + }, +}) diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/ShowSupportedResolverServices/ShowSupportedResolverServices.stories.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.stories.tsx similarity index 85% rename from apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/ShowSupportedResolverServices/ShowSupportedResolverServices.stories.tsx rename to apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.stories.tsx index aedabeb904..3bac671433 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/ShowSupportedResolverServices/ShowSupportedResolverServices.stories.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.stories.tsx @@ -9,9 +9,9 @@ import {SelectedWalletProvider} from '../../../../../SelectedWallet' import {YoroiWallet} from '../../../../../yoroi-wallets/cardano/types' import {mocks as walletMocks} from '../../../../../yoroi-wallets/mocks/wallet' import {SendProvider} from '../../../common/SendContext' -import {ShowSupportedResolverServices} from './ShowSupportedResolverServices' +import {NotifySupportedNameServers} from './NotifySupportedNameServers' -storiesOf('Send ShowSupportedResolverServices', module).add('initial', () => ) +storiesOf('Send NotifySupportedNameServers', module).add('initial', () => ) const Initial = () => { const wallet: YoroiWallet = walletMocks.wallet @@ -31,7 +31,7 @@ const Initial = () => { - + diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/ShowSupportedResolverServices/ShowSupportedResolverServices.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.tsx similarity index 95% rename from apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/ShowSupportedResolverServices/ShowSupportedResolverServices.tsx rename to apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.tsx index fa20825999..4f5c177274 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/ShowSupportedResolverServices/ShowSupportedResolverServices.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.tsx @@ -8,7 +8,7 @@ import {Icon, Spacer} from '../../../../../components' import {PressableIcon} from '../../../../../components/PressableIcon/PressableIcon' import {useStrings} from '../../../common/strings' -export const ShowSupportedResolverServices = () => { +export const NotifySupportedNameServers = () => { const strings = useStrings() const {showNotice, refetch} = useResolverShowNotice() @@ -19,7 +19,7 @@ export const ShowSupportedResolverServices = () => { setShowNotice(false) }, [setShowNotice]) - // if (showNotice === false) return null + if (!showNotice) return null return ( diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectAddressByNameServer/SelectAddressByNameServer.stories.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.stories.tsx similarity index 88% rename from apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectAddressByNameServer/SelectAddressByNameServer.stories.tsx rename to apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.stories.tsx index 22b9d61bd6..d39cb60330 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectAddressByNameServer/SelectAddressByNameServer.stories.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.stories.tsx @@ -9,9 +9,9 @@ import {SelectedWalletProvider} from '../../../../../SelectedWallet' import {YoroiWallet} from '../../../../../yoroi-wallets/cardano/types' import {mocks as walletMocks} from '../../../../../yoroi-wallets/mocks/wallet' import {initialState, SendProvider, SendState} from '../../../common/SendContext' -import {SelectAddressByNameServer} from './SelectAddressByNameServer' +import {SelectNameServer} from './SelectNameServer' -storiesOf('Send SelectAddressByNameServer', module) +storiesOf('Send SelectNameServer', module) .addDecorator((story) => { const wallet: YoroiWallet = walletMocks.wallet @@ -39,7 +39,7 @@ const UnselectedNS = () => { - + @@ -61,7 +61,7 @@ const SelectedNS = () => { - + @@ -72,11 +72,11 @@ const mockSelectedNameServer: SendState = { ...initialState, targets: [ { - entry: {address: 'address1', amounts: {'': '1000000'}}, + entry: {address: 'addr1vxggvx6uq9mtf6e0tyda2mahg84w8azngpvkwr5808ey6qsy2ww7d', amounts: {'': '1000000'}}, receiver: { as: 'domain', resolve: '$stackchain', - selectedNameServer: Resolver.NameServer.Unstoppable, + selectedNameServer: Resolver.NameServer.Cns, addressRecords: { handle: 'addr1vxggvx6uq9mtf6e0tyda2mahg84w8azngpvkwr5808ey6qsy2ww7d', cns: 'addr1qywgh46dqu7lq6mp5c6tzldpmzj6uwx335ydrpq8k7rru4q6yhkfqn5pc9f3z76e4cr64e5mf98aaeht6zwf8xl2nc9qr66sqg', @@ -89,7 +89,7 @@ const mockUnselectedNameServer: SendState = { ...initialState, targets: [ { - entry: {address: 'address1', amounts: {'': '1000000'}}, + entry: {address: '', amounts: {'': '1000000'}}, receiver: { as: 'domain', resolve: '$stackchain', diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectAddressByNameServer/SelectAddressByNameServer.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.tsx similarity index 95% rename from apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectAddressByNameServer/SelectAddressByNameServer.tsx rename to apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.tsx index 0fea995023..151ca16351 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectAddressByNameServer/SelectAddressByNameServer.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.tsx @@ -9,7 +9,7 @@ import {ButtonGroup} from '../../../common/ButtonGroup/ButtonGroup' import {useSend} from '../../../common/SendContext' import {useStrings} from '../../../common/strings' -export const SelectAddressByNameServer = () => { +export const SelectNameServer = () => { const {targets, selectedTargetIndex, nameServerSelectedChanged} = useSend() const receiver = targets[selectedTargetIndex].receiver const {addressRecords} = receiver @@ -18,7 +18,7 @@ export const SelectAddressByNameServer = () => { const shouldShow = addressRecordsEntries.length > 1 - const [animatedValue] = React.useState(new Animated.Value(0)) + const [animatedValue] = React.useState(new Animated.Value(0)) const [waitAnimation, setWaitAnimation] = React.useState(false) React.useEffect(() => { animatedValue.stopAnimation() @@ -52,6 +52,8 @@ export const SelectAddressByNameServer = () => { + + )} diff --git a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.tsx b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.tsx index 7193347579..9127e8bdd2 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.tsx @@ -6,19 +6,20 @@ import {Button, Spacer} from '../../../../components' import {useMetrics} from '../../../../metrics/metricsManager' import {useSelectedWallet} from '../../../../SelectedWallet' import {COLORS} from '../../../../theme' -import {isEmptyString} from '../../../../utils' import {useHasPendingTx, useIsOnline} from '../../../../yoroi-wallets/hooks' import {Amounts} from '../../../../yoroi-wallets/utils' +import {memoMaxLenght} from '../../common/constants' +import {AddressErrorWrongNetwork} from '../../common/errors' import {useNavigateTo} from '../../common/navigation' import {useSend} from '../../common/SendContext' import {useStrings} from '../../common/strings' import {useSendAddress} from '../../common/useSendAddress' -import {useSendInputReceiver} from '../../common/useSendInputReceiver' -import {InputMemo, maxMemoLength} from './InputMemo' +import {useSendReceiver} from '../../common/useSendReceiver' +import {InputMemo} from './InputMemo/InputMemo' import {InputReceiver} from './InputReceiver/InputReceiver' -import {SelectAddressByNameServer} from './SelectAddressByNameServer/SelectAddressByNameServer' +import {NotifySupportedNameServers} from './NotifySupportedNameServers/NotifySupportedNameServers' +import {SelectNameServer} from './SelectNameServer/SelectNameServer' import {ShowErrors} from './ShowErrors' -import {ShowSupportedResolverServices} from './ShowSupportedResolverServices/ShowSupportedResolverServices' export const StartMultiTokenTxScreen = () => { const strings = useStrings() @@ -34,41 +35,25 @@ export const StartMultiTokenTxScreen = () => { const isOnline = useIsOnline(wallet) const {targets, selectedTargetIndex, memo, memoChanged, receiverResolveChanged} = useSend() - const {address, amounts} = targets[selectedTargetIndex].entry + const {amounts} = targets[selectedTargetIndex].entry const receiver = targets[selectedTargetIndex].receiver const shouldOpenAddToken = Amounts.toArray(amounts).length === 0 - const {isResolvingAddressess, receiverError} = useSendInputReceiver() + const {isResolvingAddressess, receiverError, isUnsupportedDomain} = useSendReceiver() const {isValidatingAddress, addressError, addressValidated} = useSendAddress() const isLoading = isResolvingAddressess || isValidatingAddress - const hasError = !isLoading && (receiverError != null || addressError != null) - const isValidAddress = addressValidated && !hasError - - // const addressErrorMessage = React.useMemo( - // () => - // addressValidationError != null && succesfulResolvedAddresses.length < 2 - // ? isDomain(receiver) - // ? strings.addressInputErrorInvalidDomain - // : strings.addressInputErrorInvalidAddress - // : '', - // [ - // addressValidationError, - // receiver, - // strings.addressInputErrorInvalidAddress, - // strings.addressInputErrorInvalidDomain, - // succesfulResolvedAddresses.length, - // ], - // ) - const isValid = React.useMemo( - () => - isOnline && - !hasPendingTx && - // _.isEmpty(addressValidationError) && - memo.length <= maxMemoLength && - !isEmptyString(address), - [address, hasPendingTx, isOnline, memo.length], - ) + const {hasReceiverError, receiverErrorMessage} = useReceiverError({ + isUnsupportedDomain, + isLoading, + receiverError, + addressError, + }) + const isValidAddress = addressValidated && !hasReceiverError + + const hasMemoError = memo.length > memoMaxLenght + + const canGoNext = isOnline && !hasPendingTx && isValidAddress && !hasMemoError const handleOnNext = () => { if (shouldOpenAddToken) { @@ -77,8 +62,8 @@ export const StartMultiTokenTxScreen = () => { navigateTo.selectedTokens() } } - const handleOnChangeReceiver = (text: string) => receiverResolveChanged(text) + const handleOnChangeMemo = (text: string) => memoChanged(text) return ( @@ -91,33 +76,29 @@ export const StartMultiTokenTxScreen = () => { - - - + - - - {/* */} + - + @@ -129,6 +110,35 @@ export const StartMultiTokenTxScreen = () => { const Actions = ({style, ...props}: ViewProps) => +const useReceiverError = ({ + isUnsupportedDomain, + receiverError, + addressError, + isLoading, +}: { + isUnsupportedDomain: boolean + isLoading: boolean + receiverError: Error | null + addressError: Error | null +}) => { + const strings = useStrings() + + // NOTE: order matters + if (isLoading) return {hasReceiverError: false, receiverErrorMessage: ''} + if (isUnsupportedDomain) + return {hasReceiverError: true, receiverErrorMessage: strings.helperResolverErrorUnsupportedDomain} + if (receiverError != null) + return {hasReceiverError: true, receiverErrorMessage: strings.helperResolverErrorUnsupportedDomain} + if (addressError instanceof AddressErrorWrongNetwork) + return {hasReceiverError: true, receiverErrorMessage: strings.helperAddressErrorWrongNetwork} + if (addressError != null) return {hasReceiverError: true, receiverErrorMessage: strings.helperAddressErrorInvalid} + + return { + hasReceiverError: false, + receiverErrorMessage: '', + } +} + const styles = StyleSheet.create({ container: { flex: 1, diff --git a/apps/wallet-mobile/src/features/Settings/ChangePassword/ChangePasswordScreen.tsx b/apps/wallet-mobile/src/features/Settings/ChangePassword/ChangePasswordScreen.tsx index d9c0d7d5c1..10a7a54a45 100644 --- a/apps/wallet-mobile/src/features/Settings/ChangePassword/ChangePasswordScreen.tsx +++ b/apps/wallet-mobile/src/features/Settings/ChangePassword/ChangePasswordScreen.tsx @@ -63,7 +63,7 @@ export const ChangePasswordScreen = () => { value={newPassword} onChangeText={setNewPassword} errorText={newPasswordErrors.passwordIsWeak ? strings.passwordStrengthRequirement : undefined} - helperText={strings.passwordStrengthRequirement} + helper={strings.passwordStrengthRequirement} returnKeyType="next" onSubmitEditing={() => newPasswordConfirmationRef.current?.focus()} right={!newPasswordErrors.passwordIsWeak ? : undefined} diff --git a/apps/wallet-mobile/src/features/Settings/ManageCollateral/ConfirmTx/ConfirmTxScreen.tsx b/apps/wallet-mobile/src/features/Settings/ManageCollateral/ConfirmTx/ConfirmTxScreen.tsx index 73f8e91fbd..d3f8b6308f 100644 --- a/apps/wallet-mobile/src/features/Settings/ManageCollateral/ConfirmTx/ConfirmTxScreen.tsx +++ b/apps/wallet-mobile/src/features/Settings/ManageCollateral/ConfirmTx/ConfirmTxScreen.tsx @@ -67,7 +67,7 @@ export const ConfirmTxScreen = () => { {targets.map((target, index) => ( - + ))} diff --git a/apps/wallet-mobile/src/features/Settings/ManageCollateral/ConfirmTx/Summary/ReceiverInfo.tsx b/apps/wallet-mobile/src/features/Settings/ManageCollateral/ConfirmTx/Summary/ReceiverInfo.tsx index e6b8ff9a04..4b518e7916 100644 --- a/apps/wallet-mobile/src/features/Settings/ManageCollateral/ConfirmTx/Summary/ReceiverInfo.tsx +++ b/apps/wallet-mobile/src/features/Settings/ManageCollateral/ConfirmTx/Summary/ReceiverInfo.tsx @@ -1,15 +1,15 @@ -import {Resolver} from '@yoroi/types' import * as React from 'react' import {View} from 'react-native' import {Spacer} from '../../../../../components/Spacer' import {Text} from '../../../../../components/Text' +import {YoroiTarget} from '../../../../../yoroi-wallets/types' import {useStrings} from '../../../../Send/common/strings' type Props = { - receiver: Resolver.Receiver + target: YoroiTarget } -export const ReceiverInfo = ({receiver}: Props) => { +export const ReceiverInfo = ({target}: Props) => { const strings = useStrings() return ( @@ -18,8 +18,7 @@ export const ReceiverInfo = ({receiver}: Props) => { - {/* TODO: revisit, should receive the target not the receiver for collateral is irrelevant */} - {receiver.resolve} + {target.entry.address} ) } diff --git a/apps/wallet-mobile/src/features/Settings/ManageCollateral/ManageCollateralScreen.tsx b/apps/wallet-mobile/src/features/Settings/ManageCollateral/ManageCollateralScreen.tsx index b8b2f8effb..90f15a7a42 100644 --- a/apps/wallet-mobile/src/features/Settings/ManageCollateral/ManageCollateralScreen.tsx +++ b/apps/wallet-mobile/src/features/Settings/ManageCollateral/ManageCollateralScreen.tsx @@ -41,7 +41,13 @@ export const ManageCollateralScreen = () => { const balances = useBalances(wallet) const lockedAmount = useLockedAmount({wallet}) - const {reset: resetSendState, receiverResolveChanged, amountChanged, tokenSelectedChanged, yoroiUnsignedTxChanged} = useSend() + const { + reset: resetSendState, + receiverResolveChanged, + amountChanged, + tokenSelectedChanged, + yoroiUnsignedTxChanged, + } = useSend() const {refetch: createUnsignedTx, isFetching: isLoadingTx} = useSendTx( { wallet, diff --git a/apps/wallet-mobile/src/i18n/locales/en-US.json b/apps/wallet-mobile/src/i18n/locales/en-US.json index d1850ac209..ab43d227aa 100644 --- a/apps/wallet-mobile/src/i18n/locales/en-US.json +++ b/apps/wallet-mobile/src/i18n/locales/en-US.json @@ -241,7 +241,7 @@ "components.send.sendscreen.feeLabel": "Fee", "components.send.sendscreen.feeNotAvailable": "-", "components.send.sendscreen.receiver": "Receiver", - "components.send.sendscreen.resolvedAddress": "Related Address", + "components.send.sendscreen.resolvedAddress": "Resolved address", "components.send.sendscreen.resolverNoticeTitle": "Yoroi Supports", "components.send.sendscreen.searchTokens": "Search assets", "components.send.sendscreen.sendAllWarningAlert1": "All your {assetNameOrId} balance will be transferred in this transaction.", @@ -716,7 +716,11 @@ "scan.linksErrorUnsupportedVersion.help": "The link authority version is not yet supported by the app'", "scan.linksErrorUnsupportedVersion.title": "Unsupported version", "scan.title": "Scan the QR code", - "send.resolver.manyNameServersWarning": "There are more than one address for this domain. Please choose the desired name server.", + "send.warning.resolver.manyNameServers": "There are more than one address for this domain. Please choose the desired name server.", + "send.helper.resolver.resolvedAddress": "Resolved address", + "send.helper.resolverError.unsupportedDomain": "Please enter a supported domain", + "send.helper.addressError.invalid": "Please enter a valid address", + "send.helper.addressError.wrongNetwork": "Please enter an address for the current wallet network", "swap.listOrders.card.buttonText": "Cancel order", "swap.listOrders.completed": "completed orders", "swap.listOrders.emptyCompletedOrders": "No orders completed yet", diff --git a/apps/wallet-mobile/translations/messages/src/WalletInit/WalletForm.json b/apps/wallet-mobile/translations/messages/src/WalletInit/WalletForm.json index d7e43f30d7..3c004884f2 100644 --- a/apps/wallet-mobile/translations/messages/src/WalletInit/WalletForm.json +++ b/apps/wallet-mobile/translations/messages/src/WalletInit/WalletForm.json @@ -6,12 +6,12 @@ "start": { "line": 131, "column": 24, - "index": 4745 + "index": 4741 }, "end": { "line": 134, "column": 3, - "index": 4853 + "index": 4849 } }, { @@ -21,12 +21,12 @@ "start": { "line": 135, "column": 20, - "index": 4875 + "index": 4871 }, "end": { "line": 138, "column": 3, - "index": 4985 + "index": 4981 } }, { @@ -36,12 +36,12 @@ "start": { "line": 139, "column": 18, - "index": 5005 + "index": 5001 }, "end": { "line": 142, "column": 3, - "index": 5104 + "index": 5100 } }, { @@ -51,12 +51,12 @@ "start": { "line": 143, "column": 31, - "index": 5137 + "index": 5133 }, "end": { "line": 146, "column": 3, - "index": 5278 + "index": 5274 } }, { @@ -66,12 +66,12 @@ "start": { "line": 147, "column": 28, - "index": 5308 + "index": 5304 }, "end": { "line": 150, "column": 3, - "index": 5424 + "index": 5420 } }, { @@ -81,12 +81,12 @@ "start": { "line": 151, "column": 28, - "index": 5454 + "index": 5450 }, "end": { "line": 154, "column": 3, - "index": 5577 + "index": 5573 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/features/Send/common/strings.json b/apps/wallet-mobile/translations/messages/src/features/Send/common/strings.json index 23bc57b500..783053fceb 100644 --- a/apps/wallet-mobile/translations/messages/src/features/Send/common/strings.json +++ b/apps/wallet-mobile/translations/messages/src/features/Send/common/strings.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Please enter valid amount", "file": "src/features/Send/common/strings.ts", "start": { - "line": 72, + "line": 76, "column": 18, - "index": 4566 + "index": 4880 }, "end": { - "line": 75, + "line": 79, "column": 3, - "index": 4694 + "index": 5008 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!Please enter valid amount", "file": "src/features/Send/common/strings.ts", "start": { - "line": 76, + "line": 80, "column": 27, - "index": 4723 + "index": 5037 }, "end": { - "line": 79, + "line": 83, "column": 3, - "index": 4860 + "index": 5174 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!Amount too large", "file": "src/features/Send/common/strings.ts", "start": { - "line": 80, + "line": 84, "column": 13, - "index": 4875 + "index": 5189 }, "end": { - "line": 83, + "line": 87, "column": 3, - "index": 4989 + "index": 5303 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!Amount is too low", "file": "src/features/Send/common/strings.ts", "start": { - "line": 84, + "line": 88, "column": 11, - "index": 5002 + "index": 5316 }, "end": { - "line": 87, + "line": 91, "column": 3, - "index": 5115 + "index": 5429 } }, { @@ -64,14 +64,14 @@ "defaultMessage": "!!!Cannot send less than {minUtxo} {ticker}", "file": "src/features/Send/common/strings.ts", "start": { - "line": 88, + "line": 92, "column": 15, - "index": 5132 + "index": 5446 }, "end": { - "line": 91, + "line": 95, "column": 3, - "index": 5272 + "index": 5586 } }, { @@ -79,14 +79,14 @@ "defaultMessage": "!!!Amount must be positive", "file": "src/features/Send/common/strings.ts", "start": { - "line": 92, + "line": 96, "column": 12, - "index": 5286 + "index": 5600 }, "end": { - "line": 95, + "line": 99, "column": 3, - "index": 5406 + "index": 5720 } }, { @@ -94,14 +94,14 @@ "defaultMessage": "!!!Not enough money to make this transaction", "file": "src/features/Send/common/strings.ts", "start": { - "line": 96, + "line": 100, "column": 23, - "index": 5431 + "index": 5745 }, "end": { - "line": 99, + "line": 103, "column": 3, - "index": 5580 + "index": 5894 } }, { @@ -109,14 +109,14 @@ "defaultMessage": "!!!!Maximum value of a token inside a UTXO exceeded (overflow).", "file": "src/features/Send/common/strings.ts", "start": { - "line": 100, + "line": 104, "column": 17, - "index": 5599 + "index": 5913 }, "end": { - "line": 103, + "line": 107, "column": 3, - "index": 5761 + "index": 6075 } }, { @@ -124,14 +124,14 @@ "defaultMessage": "!!!Keep some balance for tokens", "file": "src/features/Send/common/strings.ts", "start": { - "line": 104, + "line": 108, "column": 30, - "index": 5793 + "index": 6107 }, "end": { - "line": 107, + "line": 111, "column": 3, - "index": 5903 + "index": 6217 } }, { @@ -139,14 +139,14 @@ "defaultMessage": "!!!Wallet Address", "file": "src/features/Send/common/strings.ts", "start": { - "line": 111, + "line": 115, "column": 17, - "index": 5967 + "index": 6281 }, "end": { - "line": 114, + "line": 118, "column": 3, - "index": 6065 + "index": 6379 } }, { @@ -154,14 +154,14 @@ "defaultMessage": "!!!Receiver", "file": "src/features/Send/common/strings.ts", "start": { - "line": 115, + "line": 119, "column": 12, - "index": 6079 + "index": 6393 }, "end": { - "line": 118, + "line": 122, "column": 3, - "index": 6166 + "index": 6480 } }, { @@ -169,14 +169,14 @@ "defaultMessage": "!!!Fee", "file": "src/features/Send/common/strings.ts", "start": { - "line": 119, + "line": 123, "column": 12, - "index": 6180 + "index": 6494 }, "end": { - "line": 122, + "line": 126, "column": 3, - "index": 6262 + "index": 6576 } }, { @@ -184,14 +184,14 @@ "defaultMessage": "!!!-", "file": "src/features/Send/common/strings.ts", "start": { - "line": 123, + "line": 127, "column": 19, - "index": 6283 + "index": 6597 }, "end": { - "line": 126, + "line": 130, "column": 3, - "index": 6370 + "index": 6684 } }, { @@ -199,14 +199,14 @@ "defaultMessage": "!!!Balance after", "file": "src/features/Send/common/strings.ts", "start": { - "line": 127, + "line": 131, "column": 21, - "index": 6393 + "index": 6707 }, "end": { - "line": 130, + "line": 134, "column": 3, - "index": 6480 + "index": 6794 } }, { @@ -214,14 +214,14 @@ "defaultMessage": "!!!-", "file": "src/features/Send/common/strings.ts", "start": { - "line": 131, + "line": 135, "column": 28, - "index": 6510 + "index": 6824 }, "end": { - "line": 134, + "line": 138, "column": 3, - "index": 6606 + "index": 6920 } }, { @@ -229,14 +229,14 @@ "defaultMessage": "!!!Checking balance...", "file": "src/features/Send/common/strings.ts", "start": { - "line": 135, + "line": 139, "column": 34, - "index": 6642 + "index": 6956 }, "end": { - "line": 138, + "line": 142, "column": 3, - "index": 6762 + "index": 7076 } }, { @@ -244,14 +244,14 @@ "defaultMessage": "!!!-", "file": "src/features/Send/common/strings.ts", "start": { - "line": 139, + "line": 143, "column": 36, - "index": 6800 + "index": 7114 }, "end": { - "line": 142, + "line": 146, "column": 3, - "index": 6904 + "index": 7218 } }, { @@ -259,14 +259,14 @@ "defaultMessage": "!!!Please enter valid address", "file": "src/features/Send/common/strings.ts", "start": { - "line": 143, + "line": 147, "column": 35, - "index": 6941 + "index": 7255 }, "end": { - "line": 146, + "line": 150, "column": 3, - "index": 7069 + "index": 7383 } }, { @@ -274,14 +274,14 @@ "defaultMessage": "!!!Please enter valid domain", "file": "src/features/Send/common/strings.ts", "start": { - "line": 147, + "line": 151, "column": 34, - "index": 7105 + "index": 7419 }, "end": { - "line": 150, + "line": 154, "column": 3, - "index": 7231 + "index": 7545 } }, { @@ -289,14 +289,14 @@ "defaultMessage": "!!!Receiver address, ADA Handle or domains", "file": "src/features/Send/common/strings.ts", "start": { - "line": 151, + "line": 155, "column": 21, - "index": 7254 + "index": 7568 }, "end": { - "line": 154, + "line": 158, "column": 3, - "index": 7375 + "index": 7689 } }, { @@ -304,14 +304,14 @@ "defaultMessage": "!!!Send all assets (including all tokens)", "file": "src/features/Send/common/strings.ts", "start": { - "line": 155, + "line": 159, "column": 25, - "index": 7402 + "index": 7716 }, "end": { - "line": 158, + "line": 162, "column": 3, - "index": 7532 + "index": 7846 } }, { @@ -319,14 +319,14 @@ "defaultMessage": "!!!Send all {assetId}", "file": "src/features/Send/common/strings.ts", "start": { - "line": 159, + "line": 163, "column": 19, - "index": 7553 + "index": 7867 }, "end": { - "line": 162, + "line": 166, "column": 3, - "index": 7657 + "index": 7971 } }, { @@ -335,14 +335,14 @@ "defaultMessage": "!!!Domain is not registered", "file": "src/features/Send/common/strings.ts", "start": { - "line": 163, + "line": 167, "column": 28, - "index": 7687 + "index": 8001 }, "end": { - "line": 167, + "line": 171, "column": 3, - "index": 7836 + "index": 8150 } }, { @@ -351,14 +351,14 @@ "defaultMessage": "!!!No Cardano record found for this domain", "file": "src/features/Send/common/strings.ts", "start": { - "line": 168, + "line": 172, "column": 29, - "index": 7867 + "index": 8181 }, "end": { - "line": 172, + "line": 176, "column": 3, - "index": 8032 + "index": 8346 } }, { @@ -367,14 +367,14 @@ "defaultMessage": "!!!Domain is not supported", "file": "src/features/Send/common/strings.ts", "start": { - "line": 173, + "line": 177, "column": 26, - "index": 8060 + "index": 8374 }, "end": { - "line": 177, + "line": 181, "column": 3, - "index": 8206 + "index": 8520 } }, { @@ -382,14 +382,14 @@ "defaultMessage": "!!!Search tokens", "file": "src/features/Send/common/strings.ts", "start": { - "line": 178, + "line": 182, "column": 16, - "index": 8224 + "index": 8538 }, "end": { - "line": 181, + "line": 185, "column": 3, - "index": 8320 + "index": 8634 } }, { @@ -397,14 +397,14 @@ "defaultMessage": "!!!Select asset", "file": "src/features/Send/common/strings.ts", "start": { - "line": 182, + "line": 186, "column": 20, - "index": 8342 + "index": 8656 }, "end": { - "line": 185, + "line": 189, "column": 3, - "index": 8431 + "index": 8745 } }, { @@ -412,14 +412,14 @@ "defaultMessage": "!!!Unknown asset", "file": "src/features/Send/common/strings.ts", "start": { - "line": 186, + "line": 190, "column": 16, - "index": 8449 + "index": 8763 }, "end": { - "line": 189, + "line": 193, "column": 3, - "index": 8554 + "index": 8868 } }, { @@ -427,14 +427,14 @@ "defaultMessage": "!!!No assets found", "file": "src/features/Send/common/strings.ts", "start": { - "line": 190, + "line": 194, "column": 12, - "index": 8568 + "index": 8882 }, "end": { - "line": 193, + "line": 197, "column": 3, - "index": 8671 + "index": 8985 } }, { @@ -442,14 +442,14 @@ "defaultMessage": "!!!found", "file": "src/features/Send/common/strings.ts", "start": { - "line": 194, + "line": 198, "column": 9, - "index": 8682 + "index": 8996 }, "end": { - "line": 197, + "line": 201, "column": 3, - "index": 8772 + "index": 9086 } }, { @@ -457,14 +457,14 @@ "defaultMessage": "!!!You have", "file": "src/features/Send/common/strings.ts", "start": { - "line": 198, + "line": 202, "column": 11, - "index": 8785 + "index": 9099 }, "end": { - "line": 201, + "line": 205, "column": 3, - "index": 8880 + "index": 9194 } }, { @@ -472,14 +472,14 @@ "defaultMessage": "!!!No {fungible} added yet", "file": "src/features/Send/common/strings.ts", "start": { - "line": 202, + "line": 206, "column": 20, - "index": 8902 + "index": 9216 }, "end": { - "line": 205, + "line": 209, "column": 3, - "index": 9021 + "index": 9335 } }, { @@ -487,14 +487,14 @@ "defaultMessage": "!!!Do you really want to send all?", "file": "src/features/Send/common/strings.ts", "start": { - "line": 206, + "line": 210, "column": 23, - "index": 9046 + "index": 9360 }, "end": { - "line": 209, + "line": 213, "column": 3, - "index": 9167 + "index": 9481 } }, { @@ -502,14 +502,14 @@ "defaultMessage": "!!!You have selected the send all option. Please confirm that you understand how this feature works.", "file": "src/features/Send/common/strings.ts", "start": { - "line": 210, + "line": 214, "column": 22, - "index": 9191 + "index": 9505 }, "end": { - "line": 214, + "line": 218, "column": 3, - "index": 9383 + "index": 9697 } }, { @@ -517,14 +517,14 @@ "defaultMessage": "!!!All you {assetNameOrId} balance will be transferred in this transaction.", "file": "src/features/Send/common/strings.ts", "start": { - "line": 215, + "line": 219, "column": 24, - "index": 9409 + "index": 9723 }, "end": { - "line": 218, + "line": 222, "column": 3, - "index": 9572 + "index": 9886 } }, { @@ -532,14 +532,14 @@ "defaultMessage": "!!!All your tokens, including NFTs and any other native assets in your wallet, will also be transferred in this transaction.", "file": "src/features/Send/common/strings.ts", "start": { - "line": 219, + "line": 223, "column": 24, - "index": 9598 + "index": 9912 }, "end": { - "line": 224, + "line": 228, "column": 3, - "index": 9827 + "index": 10141 } }, { @@ -547,14 +547,14 @@ "defaultMessage": "!!!After you confirm the transaction in the next screen, your wallet will be emptied.", "file": "src/features/Send/common/strings.ts", "start": { - "line": 225, + "line": 229, "column": 24, - "index": 9853 + "index": 10167 }, "end": { - "line": 228, + "line": 232, "column": 3, - "index": 10026 + "index": 10340 } }, { @@ -562,14 +562,14 @@ "defaultMessage": "!!!Continue", "file": "src/features/Send/common/strings.ts", "start": { - "line": 229, + "line": 233, "column": 18, - "index": 10046 + "index": 10360 }, "end": { - "line": 232, + "line": 236, "column": 3, - "index": 10139 + "index": 10453 } }, { @@ -577,14 +577,14 @@ "defaultMessage": "!!!We are experiencing issues with fetching your current balance. Click to retry.", "file": "src/features/Send/common/strings.ts", "start": { - "line": 233, + "line": 237, "column": 27, - "index": 10168 + "index": 10482 }, "end": { - "line": 236, + "line": 240, "column": 3, - "index": 10340 + "index": 10654 } }, { @@ -592,14 +592,14 @@ "defaultMessage": "!!!You cannot send a new transaction while an existing one is still pending", "file": "src/features/Send/common/strings.ts", "start": { - "line": 237, + "line": 241, "column": 41, - "index": 10383 + "index": 10697 }, "end": { - "line": 240, + "line": 244, "column": 3, - "index": 10563 + "index": 10877 } }, { @@ -607,14 +607,14 @@ "defaultMessage": "!!!Transaction submitted", "file": "src/features/Send/common/strings.ts", "start": { - "line": 241, + "line": 245, "column": 20, - "index": 10585 + "index": 10899 }, "end": { - "line": 244, + "line": 248, "column": 3, - "index": 10693 + "index": 11007 } }, { @@ -622,14 +622,14 @@ "defaultMessage": "!!!Check this transaction in the list of wallet transactions", "file": "src/features/Send/common/strings.ts", "start": { - "line": 245, + "line": 249, "column": 19, - "index": 10714 + "index": 11028 }, "end": { - "line": 248, + "line": 252, "column": 3, - "index": 10857 + "index": 11171 } }, { @@ -637,14 +637,14 @@ "defaultMessage": "!!!Go to transactions", "file": "src/features/Send/common/strings.ts", "start": { - "line": 249, + "line": 253, "column": 21, - "index": 10880 + "index": 11194 }, "end": { - "line": 252, + "line": 256, "column": 3, - "index": 10986 + "index": 11300 } }, { @@ -652,14 +652,14 @@ "defaultMessage": "!!!Transaction failed", "file": "src/features/Send/common/strings.ts", "start": { - "line": 253, + "line": 257, "column": 17, - "index": 11005 + "index": 11319 }, "end": { - "line": 256, + "line": 260, "column": 3, - "index": 11107 + "index": 11421 } }, { @@ -667,14 +667,14 @@ "defaultMessage": "!!!Your transaction has not been processed properly due to technical issues", "file": "src/features/Send/common/strings.ts", "start": { - "line": 257, + "line": 261, "column": 16, - "index": 11125 + "index": 11439 }, "end": { - "line": 260, + "line": 264, "column": 3, - "index": 11280 + "index": 11594 } }, { @@ -682,14 +682,14 @@ "defaultMessage": "!!!Try again", "file": "src/features/Send/common/strings.ts", "start": { - "line": 261, + "line": 265, "column": 18, - "index": 11300 + "index": 11614 }, "end": { - "line": 264, + "line": 268, "column": 3, - "index": 11394 + "index": 11708 } }, { @@ -697,14 +697,14 @@ "defaultMessage": "!!!Asset", "file": "src/features/Send/common/strings.ts", "start": { - "line": 265, + "line": 269, "column": 9, - "index": 11405 + "index": 11719 }, "end": { - "line": 268, + "line": 272, "column": 3, - "index": 11478 + "index": 11792 } }, { @@ -712,14 +712,14 @@ "defaultMessage": "!!!Scan recipients QR code to add a wallet address", "file": "src/features/Send/common/strings.ts", "start": { - "line": 269, + "line": 273, "column": 23, - "index": 11503 + "index": 11817 }, "end": { - "line": 272, + "line": 276, "column": 3, - "index": 11630 + "index": 11944 } }, { @@ -727,14 +727,14 @@ "defaultMessage": "!!!Related Address", "file": "src/features/Send/common/strings.ts", "start": { - "line": 273, + "line": 277, "column": 19, - "index": 11651 + "index": 11965 }, "end": { - "line": 276, + "line": 280, "column": 3, - "index": 11752 + "index": 12066 } }, { @@ -742,29 +742,119 @@ "defaultMessage": "!!!Yoroi Supports Name Resolution", "file": "src/features/Send/common/strings.ts", "start": { - "line": 277, + "line": 281, "column": 23, - "index": 11777 + "index": 12091 }, "end": { - "line": 280, + "line": 284, "column": 3, - "index": 11897 + "index": 12211 } }, { - "id": "send.resolver.manyNameServersWarning", + "id": "send.warning.resolver.manyNameServers", "defaultMessage": "!!!Multiple name servers found. Please select one.", "file": "src/features/Send/common/strings.ts", "start": { - "line": 281, + "line": 285, "column": 26, - "index": 11925 + "index": 12239 }, "end": { - "line": 284, + "line": 288, + "column": 3, + "index": 12367 + } + }, + { + "id": "send.helper.addressError.invalid", + "defaultMessage": "!!!Please enter valid address", + "file": "src/features/Send/common/strings.ts", + "start": { + "line": 289, + "column": 29, + "index": 12398 + }, + "end": { + "line": 292, + "column": 3, + "index": 12500 + } + }, + { + "id": "send.helper.addressError.wrongNetwork", + "defaultMessage": "!!!Please enter valid domain", + "file": "src/features/Send/common/strings.ts", + "start": { + "line": 293, + "column": 34, + "index": 12536 + }, + "end": { + "line": 296, + "column": 3, + "index": 12642 + } + }, + { + "id": "send.helper.resolverError.unsupportedDomain", + "defaultMessage": "!!!Domain is not supported", + "file": "src/features/Send/common/strings.ts", + "start": { + "line": 297, + "column": 40, + "index": 12684 + }, + "end": { + "line": 300, + "column": 3, + "index": 12794 + } + }, + { + "id": "components.send.memofield.label", + "defaultMessage": "!!!Memo", + "file": "src/features/Send/common/strings.ts", + "start": { + "line": 301, + "column": 13, + "index": 12809 + }, + "end": { + "line": 304, + "column": 3, + "index": 12888 + } + }, + { + "id": "components.send.memofield.message", + "defaultMessage": "!!!(Optional) Memo is stored locally", + "file": "src/features/Send/common/strings.ts", + "start": { + "line": 305, + "column": 26, + "index": 12916 + }, + "end": { + "line": 308, + "column": 3, + "index": 13026 + } + }, + { + "id": "components.send.memofield.error", + "defaultMessage": "!!!Memo is too long", + "file": "src/features/Send/common/strings.ts", + "start": { + "line": 309, + "column": 26, + "index": 13054 + }, + "end": { + "line": 312, "column": 3, - "index": 12052 + "index": 13145 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/features/Settings/ChangePassword/ChangePasswordScreen.json b/apps/wallet-mobile/translations/messages/src/features/Settings/ChangePassword/ChangePasswordScreen.json index aa01c74a46..66710ee09c 100644 --- a/apps/wallet-mobile/translations/messages/src/features/Settings/ChangePassword/ChangePasswordScreen.json +++ b/apps/wallet-mobile/translations/messages/src/features/Settings/ChangePassword/ChangePasswordScreen.json @@ -6,12 +6,12 @@ "start": { "line": 111, "column": 25, - "index": 4319 + "index": 4315 }, "end": { "line": 114, "column": 3, - "index": 4441 + "index": 4437 } }, { @@ -21,12 +21,12 @@ "start": { "line": 115, "column": 25, - "index": 4468 + "index": 4464 }, "end": { "line": 118, "column": 3, - "index": 4586 + "index": 4582 } }, { @@ -36,12 +36,12 @@ "start": { "line": 119, "column": 31, - "index": 4619 + "index": 4615 }, "end": { "line": 122, "column": 3, - "index": 4784 + "index": 4780 } }, { @@ -51,12 +51,12 @@ "start": { "line": 123, "column": 28, - "index": 4814 + "index": 4810 }, "end": { "line": 126, "column": 3, - "index": 4942 + "index": 4938 } }, { @@ -66,12 +66,12 @@ "start": { "line": 127, "column": 36, - "index": 4980 + "index": 4976 }, "end": { "line": 130, "column": 3, - "index": 5119 + "index": 5115 } }, { @@ -81,12 +81,12 @@ "start": { "line": 131, "column": 18, - "index": 5139 + "index": 5135 }, "end": { "line": 134, "column": 3, - "index": 5253 + "index": 5249 } } ] \ No newline at end of file