integrate global wallet into app
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
use crate::persist::{AppSizeHandler, ZoomHandler};
|
use crate::persist::{AppSizeHandler, ZoomHandler};
|
||||||
|
use crate::wallet::GlobalWallet;
|
||||||
use crate::{
|
use crate::{
|
||||||
AccountStorage, Accounts, AppContext, Args, DataPath, DataPathType, Directory, Images,
|
AccountStorage, Accounts, AppContext, Args, DataPath, DataPathType, Directory, Images,
|
||||||
NoteCache, RelayDebugView, ThemeHandler, UnknownIds,
|
NoteCache, RelayDebugView, ThemeHandler, UnknownIds,
|
||||||
@@ -25,6 +26,7 @@ pub struct Notedeck {
|
|||||||
pool: RelayPool,
|
pool: RelayPool,
|
||||||
note_cache: NoteCache,
|
note_cache: NoteCache,
|
||||||
accounts: Accounts,
|
accounts: Accounts,
|
||||||
|
global_wallet: GlobalWallet,
|
||||||
path: DataPath,
|
path: DataPath,
|
||||||
args: Args,
|
args: Args,
|
||||||
theme: ThemeHandler,
|
theme: ThemeHandler,
|
||||||
@@ -202,6 +204,8 @@ impl Notedeck {
|
|||||||
error!("error migrating image cache: {e}");
|
error!("error migrating image cache: {e}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let global_wallet = GlobalWallet::new(&path);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
ndb,
|
ndb,
|
||||||
img_cache,
|
img_cache,
|
||||||
@@ -209,6 +213,7 @@ impl Notedeck {
|
|||||||
pool,
|
pool,
|
||||||
note_cache,
|
note_cache,
|
||||||
accounts,
|
accounts,
|
||||||
|
global_wallet,
|
||||||
path: path.clone(),
|
path: path.clone(),
|
||||||
args: parsed_args,
|
args: parsed_args,
|
||||||
theme,
|
theme,
|
||||||
@@ -233,6 +238,7 @@ impl Notedeck {
|
|||||||
pool: &mut self.pool,
|
pool: &mut self.pool,
|
||||||
note_cache: &mut self.note_cache,
|
note_cache: &mut self.note_cache,
|
||||||
accounts: &mut self.accounts,
|
accounts: &mut self.accounts,
|
||||||
|
global_wallet: &mut self.global_wallet,
|
||||||
path: &self.path,
|
path: &self.path,
|
||||||
args: &self.args,
|
args: &self.args,
|
||||||
theme: &mut self.theme,
|
theme: &mut self.theme,
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
use crate::{Accounts, Args, DataPath, Images, NoteCache, ThemeHandler, UnknownIds};
|
use crate::{
|
||||||
|
wallet::GlobalWallet, Accounts, Args, DataPath, Images, NoteCache, ThemeHandler, UnknownIds,
|
||||||
|
};
|
||||||
use egui_winit::clipboard::Clipboard;
|
use egui_winit::clipboard::Clipboard;
|
||||||
|
|
||||||
use enostr::RelayPool;
|
use enostr::RelayPool;
|
||||||
@@ -13,6 +15,7 @@ pub struct AppContext<'a> {
|
|||||||
pub pool: &'a mut RelayPool,
|
pub pool: &'a mut RelayPool,
|
||||||
pub note_cache: &'a mut NoteCache,
|
pub note_cache: &'a mut NoteCache,
|
||||||
pub accounts: &'a mut Accounts,
|
pub accounts: &'a mut Accounts,
|
||||||
|
pub global_wallet: &'a mut GlobalWallet,
|
||||||
pub path: &'a DataPath,
|
pub path: &'a DataPath,
|
||||||
pub args: &'a Args,
|
pub args: &'a Args,
|
||||||
pub theme: &'a mut ThemeHandler,
|
pub theme: &'a mut ThemeHandler,
|
||||||
|
|||||||
Reference in New Issue
Block a user