native ui + touch id unlock + portfolio dashboard

This commit is contained in:
2026-08-01 19:07:49 +08:00
parent 42a22918a3
commit bd8ba8e3e5
18 changed files with 675 additions and 194 deletions
@@ -179,6 +179,28 @@ export const XrpWallet = () => {
return false
}
const autoUnlock = async (walletId?: string) => {
const id = walletId ?? currentWalletId ?? wallets[0]?.id
if (!id) return false
currentWalletId = id
const wallet = wallets.find((w) => w.id === id)
if (!wallet) return false
if (electrobun.rpc && wallet.hasPassword) {
const [ph] = await tryCatch(
electrobun.rpc.request.getSecret({
service: 'koins',
name: `xrp_auth_${id}`,
}),
)
if (ph) currentPasswordHash = ph
} else {
currentPasswordHash = null
}
const ok = await loadSeedForWallet(id)
if (ok) accountType = 'xrp'
return ok
}
const saveWallet = async (
kind: 'create' | 'import',
name: string,
@@ -412,6 +434,7 @@ export const XrpWallet = () => {
hashPassword,
selectWallet,
selectAndUnlockWallet,
autoUnlock,
loadSeedForWallet,
deleteWallet,
clearSelection,