feat: support ncryptsec

This commit is contained in:
codytseng
2025-01-15 23:32:22 +08:00
parent 52daf39584
commit e2cdc27545
11 changed files with 246 additions and 73 deletions

View File

@@ -156,6 +156,13 @@ class StorageService {
return account?.nsec
}
getAccountNcryptsec(pubkey: string) {
const account = this.accounts.find(
(act) => act.pubkey === pubkey && act.signerType === 'ncryptsec'
)
return account?.ncryptsec
}
addAccount(account: TAccount) {
if (this.accounts.find((act) => isSameAccount(act, account))) {
return