Skip to content

Commit

Permalink
feat: mnemonic copy feedback to user (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
TravellerOnTheRun authored Oct 31, 2023
1 parent ad925e4 commit 9b4eea8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/mnemonic/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Clipboard from '@react-native-community/clipboard'
import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'
import { Alert, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'
import Icon from 'react-native-vector-icons/FontAwesome5'

import { sharedColors, sharedStyles } from 'shared/constants'
Expand Down Expand Up @@ -62,6 +62,7 @@ export const MnemonicComponent = ({
Clipboard.setString(string)
setTitle(t('mnemonic_title_copy'))
setBody(t('mnemonic_body_copy'))
Alert.alert(t('mnemonic_copied'))
}, [words, t])

const onEyeIconPress = useCallback(() => {
Expand Down
1 change: 1 addition & 0 deletions src/lib/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const resources = {
'Any "rooted" app can access your private keys and steal your funds. Wipe this wallet immediately and restore it on a secure device.',
no_selected_wallet: 'No selected wallet',
address_copied_to_keyboard: 'Address copied to Clipboard',
mnemonic_copied: 'Mnemonic has been copied to Clipboard!',
message_copied_to_clipboard: 'Copied to Clipboard',
ok: 'OK',
back: 'Go Back',
Expand Down

0 comments on commit 9b4eea8

Please sign in to comment.