Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/hooks/useWallet.js
Show First 20 Lines • Show All 363 Lines • ▼ Show 20 Lines | const getWalletDetails = async wallet => { | ||||
masterHDNode, | masterHDNode, | ||||
path: "m/44'/145'/0'/0/0", | path: "m/44'/145'/0'/0/0", | ||||
}); | }); | ||||
const Path1899 = await deriveAccount(BCH, { | const Path1899 = await deriveAccount(BCH, { | ||||
masterHDNode, | masterHDNode, | ||||
path: "m/44'/1899'/0'/0/0", | path: "m/44'/1899'/0'/0/0", | ||||
}); | }); | ||||
let name = Path145.cashAddress.slice(12, 17); | let name = Path1899.cashAddress.slice(12, 17); | ||||
// Only set the name if it does not currently exist | // Only set the name if it does not currently exist | ||||
if (wallet && wallet.name) { | if (wallet && wallet.name) { | ||||
name = wallet.name; | name = wallet.name; | ||||
} | } | ||||
return { | return { | ||||
mnemonic: wallet.mnemonic, | mnemonic: wallet.mnemonic, | ||||
name, | name, | ||||
▲ Show 20 Lines • Show All 856 Lines • Show Last 20 Lines |