fix: use standard nano seed instead of ledger's implementation
This commit is contained in:
parent
44729f247a
commit
e29f1a8edc
|
@ -135,14 +135,16 @@ const RecentTransactions: FC<Props> = () => {
|
||||||
<h2 className="text-2xl font-semibold text-gray-900 dark:text-purple-50">
|
<h2 className="text-2xl font-semibold text-gray-900 dark:text-purple-50">
|
||||||
recent transactions
|
recent transactions
|
||||||
</h2>
|
</h2>
|
||||||
<button
|
{hasHistory && (
|
||||||
onClick={() => {
|
<button
|
||||||
setRefectingHistory(true)
|
onClick={() => {
|
||||||
refetchHistory()
|
setRefectingHistory(true)
|
||||||
}}
|
refetchHistory()
|
||||||
>
|
}}
|
||||||
<RefreshIcon className="h-6" />
|
>
|
||||||
</button>
|
<RefreshIcon className="h-6" />
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
{initialLoadingHistory || refetchingHistory ? (
|
{initialLoadingHistory || refetchingHistory ? (
|
||||||
<ul className="flex flex-col w-full overflow-auto px-0.5 pb-0.5 gap-2">
|
<ul className="flex flex-col w-full overflow-auto px-0.5 pb-0.5 gap-2">
|
||||||
|
|
|
@ -31,7 +31,10 @@ const useSetupSeed = (skip?: boolean) => {
|
||||||
wallet.generateLegacy(),
|
wallet.generateLegacy(),
|
||||||
registerBiometrics(),
|
registerBiometrics(),
|
||||||
])
|
])
|
||||||
const { address, publicKey } = accountAtIndex(generatedSeed, 0)
|
const { address, publicKey } = accountAtIndex(
|
||||||
|
generatedSeed.toLocaleUpperCase(),
|
||||||
|
0
|
||||||
|
)
|
||||||
|
|
||||||
const account: AccountInfoCache = {
|
const account: AccountInfoCache = {
|
||||||
frontier: null,
|
frontier: null,
|
||||||
|
@ -42,7 +45,7 @@ const useSetupSeed = (skip?: boolean) => {
|
||||||
publicKey,
|
publicKey,
|
||||||
precomputedWork: null,
|
precomputedWork: null,
|
||||||
}
|
}
|
||||||
setSeed({ seed: generatedSeed, mnemonic })
|
setSeed({ seed: generatedSeed.toLocaleUpperCase(), mnemonic })
|
||||||
setAccount(account)
|
setAccount(account)
|
||||||
addAccount(0, account)
|
addAccount(0, account)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { wallet } from 'nanocurrency-web'
|
import { wallet } from 'nanocurrency-web'
|
||||||
|
|
||||||
const accountAtIndex = (seed: string, index: number) =>
|
const accountAtIndex = (seed: string, index: number) =>
|
||||||
wallet.accounts(seed, index, index)[0]
|
wallet.legacyAccounts(seed, index, index)[0]
|
||||||
|
|
||||||
export default accountAtIndex
|
export default accountAtIndex
|
||||||
|
|
Reference in a new issue