forked from cerc-io/laconic-wallet
Display hdpaths for newly created accounts
This commit is contained in:
+10
-2
@@ -27,8 +27,10 @@ const Accounts: React.FC<AccountsProps> = ({
|
||||
setIsAccountCreating(true);
|
||||
const newAccount = await addAccount(network);
|
||||
setIsAccountCreating(false);
|
||||
newAccount && updateAccounts(newAccount);
|
||||
updateIndex(selectedAccounts[selectedAccounts.length - 1].id + 1);
|
||||
if (newAccount) {
|
||||
updateAccounts(newAccount);
|
||||
updateIndex(newAccount.id);
|
||||
}
|
||||
};
|
||||
|
||||
const selectedAccounts: Account[] = (() => {
|
||||
@@ -82,6 +84,12 @@ const Accounts: React.FC<AccountsProps> = ({
|
||||
<Text style={styles.highlight}>Public Key: </Text>
|
||||
{selectedAccounts[currentIndex]?.pubKey}
|
||||
</Text>
|
||||
<Text variant="bodyLarge">
|
||||
<Text style={{ fontWeight: '700' }}>HD Path: </Text>
|
||||
{selectedAccounts &&
|
||||
selectedAccounts[currentIndex] &&
|
||||
selectedAccounts[currentIndex].hdPath}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
<View style={styles.signLink}>
|
||||
|
||||
@@ -30,7 +30,6 @@ const HomeScreen = () => {
|
||||
|
||||
const createWalletHandler = async () => {
|
||||
setIsWalletCreating(true);
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
const { mnemonic, ethAccounts, cosmosAccounts } = await createWallet();
|
||||
ethAccounts &&
|
||||
cosmosAccounts &&
|
||||
|
||||
Reference in New Issue
Block a user