forked from cerc-io/laconic-wallet
* Display HD path on sign message page * Create component for displaying account details * Add retrieve accounts function * Load accounts after closing app * Fix the retrieve accounts function * Use hdpath instead of id * Check if keystore is empty while retrieving accounts * Add spinner when accounts are being fetched * Display complete hd paths after reloading the app * Remove any return type * Store public key and address * Modify sign message function to use path * Fix the add accounts functionality
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
import { View } from 'react-native';
|
|
import { Button, Dialog, Portal, Text } from 'react-native-paper';
|
|
|
|
import styles from '../styles/stylesheet';
|
|
import GridView from './Grid';
|
|
import { CustomDialogProps } from '../types';
|
|
|
|
const DialogComponent = ({
|
|
visible,
|
|
hideDialog,
|
|
contentText,
|
|
}: CustomDialogProps) => {
|
|
const words = contentText.split(' ');
|
|
|
|
return (
|
|
<Portal>
|
|
<Dialog visible={visible} onDismiss={hideDialog}>
|
|
<Dialog.Content>
|
|
<Text variant="titleLarge">Mnemonic</Text>
|
|
<View style={styles.dialogTitle}>
|
|
<Text variant="titleMedium">
|
|
Your mnemonic provides full access to your wallet and funds. Make
|
|
sure to note it down.{' '}
|
|
</Text>
|
|
<Text variant="titleMedium" style={styles.dialogWarning}>
|
|
Do not share your mnemonic with anyone
|
|
</Text>
|
|
<GridView words={words} />
|
|
</View>
|
|
</Dialog.Content>
|
|
<Dialog.Actions>
|
|
<Button onPress={hideDialog}>Done</Button>
|
|
</Dialog.Actions>
|
|
</Dialog>
|
|
</Portal>
|
|
);
|
|
};
|
|
|
|
export { DialogComponent };
|