feat: generate new account & profile editor
This commit is contained in:
parent
3f031da748
commit
78629dd64f
33 changed files with 535 additions and 142 deletions
|
|
@ -399,6 +399,11 @@ class ClientService extends EventTarget {
|
|||
}
|
||||
}
|
||||
|
||||
updateProfileCache(event: NEvent) {
|
||||
this.profileEventDataloader.clear(event.pubkey)
|
||||
this.profileEventDataloader.prime(event.pubkey, Promise.resolve(event))
|
||||
}
|
||||
|
||||
async fetchProfiles(relayUrls: string[], filter: Filter): Promise<TProfile[]> {
|
||||
const events = await this.pool.querySync(relayUrls, {
|
||||
...filter,
|
||||
|
|
|
|||
|
|
@ -151,6 +151,11 @@ class StorageService {
|
|||
return this.currentAccount
|
||||
}
|
||||
|
||||
getAccountNsec(pubkey: string) {
|
||||
const account = this.accounts.find((act) => act.pubkey === pubkey && act.signerType === 'nsec')
|
||||
return account?.nsec
|
||||
}
|
||||
|
||||
addAccount(account: TAccount) {
|
||||
if (this.accounts.find((act) => isSameAccount(act, account))) {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue