migrate AccountManagementView to enostr Keypair

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
kernelkind
2024-05-14 16:23:45 -04:00
committed by William Casarin
parent bb25fd4ae1
commit 95f8623c41
7 changed files with 51 additions and 25 deletions

View File

@@ -292,7 +292,7 @@ impl<'a> AccountSelectionWidget<'a> {
// PREVIEWS
mod preview {
use nostr_sdk::{Keys, PublicKey};
use enostr::{FullKeypair, Pubkey};
use nostrdb::{Config, Ndb};
use super::*;
@@ -325,7 +325,10 @@ mod preview {
ACCOUNT_HEXES
.iter()
.map(|account_hex| {
let key = Keys::from_public_key(PublicKey::from_hex(account_hex).unwrap());
let key = FullKeypair::new(
Pubkey::from_hex(account_hex).unwrap(),
FullKeypair::generate().secret_key,
);
UserAccount {
key,