@@ -14,7 +14,7 @@ use crate::commands::OfflineWalletSubCommand::*;
1414use crate :: commands:: * ;
1515use crate :: error:: BDKCliError as Error ;
1616#[ cfg( any( feature = "sqlite" , feature = "redb" ) ) ]
17- use crate :: persister:: { Persister , PersisterError } ;
17+ use crate :: persister:: Persister ;
1818#[ cfg( feature = "cbf" ) ]
1919use crate :: utils:: BlockchainClient :: KyotoClient ;
2020use crate :: utils:: * ;
@@ -764,23 +764,20 @@ pub(crate) async fn handle_command(cli_opts: CliOpts) -> Result<String, Error> {
764764 #[ cfg( feature = "sqlite" ) ]
765765 DatabaseType :: Sqlite => {
766766 let db_file = database_path. join ( "wallet.sqlite" ) ;
767- let connection = Connection :: open ( db_file) . map_err ( PersisterError :: from ) ?;
767+ let connection = Connection :: open ( db_file) ?;
768768 log:: debug!( "Sqlite database opened successfully" ) ;
769769 Persister :: Connection ( connection)
770770 }
771771 #[ cfg( feature = "redb" ) ]
772772 DatabaseType :: Redb => {
773773 let db = Arc :: new (
774774 bdk_redb:: redb:: Database :: create ( database_path. join ( "wallet.redb" ) )
775- . map_err ( bdk_redb:: redb:: Error :: from)
776- . map_err ( bdk_redb:: error:: StoreError :: from)
777- . map_err ( PersisterError :: from) ?,
775+ . map_err ( bdk_redb:: error:: StoreError :: from) ?,
778776 ) ;
779777 let store = RedbStore :: new (
780778 db,
781779 wallet_name. as_deref ( ) . unwrap_or ( "wallet1" ) . to_string ( ) ,
782- )
783- . map_err ( PersisterError :: from) ?;
780+ ) ?;
784781 log:: debug!( "Redb database opened successfully" ) ;
785782 Persister :: RedbStore ( store)
786783 }
@@ -824,23 +821,20 @@ pub(crate) async fn handle_command(cli_opts: CliOpts) -> Result<String, Error> {
824821 #[ cfg( feature = "sqlite" ) ]
825822 DatabaseType :: Sqlite => {
826823 let db_file = database_path. join ( "wallet.sqlite" ) ;
827- let connection = Connection :: open ( db_file) . map_err ( PersisterError :: from ) ?;
824+ let connection = Connection :: open ( db_file) ?;
828825 log:: debug!( "Sqlite database opened successfully" ) ;
829826 Persister :: Connection ( connection)
830827 }
831828 #[ cfg( feature = "redb" ) ]
832829 DatabaseType :: Redb => {
833830 let db = Arc :: new (
834831 bdk_redb:: redb:: Database :: create ( database_path. join ( "wallet.redb" ) )
835- . map_err ( bdk_redb:: redb:: Error :: from)
836- . map_err ( bdk_redb:: error:: StoreError :: from)
837- . map_err ( PersisterError :: from) ?,
832+ . map_err ( bdk_redb:: error:: StoreError :: from) ?,
838833 ) ;
839834 let store = RedbStore :: new (
840835 db,
841836 wallet_name. as_deref ( ) . unwrap_or ( "wallet1" ) . to_string ( ) ,
842- )
843- . map_err ( PersisterError :: from) ?;
837+ ) ?;
844838 log:: debug!( "Redb database opened successfully" ) ;
845839 Persister :: RedbStore ( store)
846840 }
@@ -891,23 +885,20 @@ pub(crate) async fn handle_command(cli_opts: CliOpts) -> Result<String, Error> {
891885 #[ cfg( feature = "sqlite" ) ]
892886 DatabaseType :: Sqlite => {
893887 let db_file = database_path. join ( "wallet.sqlite" ) ;
894- let connection = Connection :: open ( db_file) . map_err ( PersisterError :: from ) ?;
888+ let connection = Connection :: open ( db_file) ?;
895889 log:: debug!( "Sqlite database opened successfully" ) ;
896890 Persister :: Connection ( connection)
897891 }
898892 #[ cfg( feature = "redb" ) ]
899893 DatabaseType :: Redb => {
900894 let db = Arc :: new (
901895 bdk_redb:: redb:: Database :: create ( database_path. join ( "wallet.redb" ) )
902- . map_err ( bdk_redb:: redb:: Error :: from)
903- . map_err ( bdk_redb:: error:: StoreError :: from)
904- . map_err ( PersisterError :: from) ?,
896+ . map_err ( bdk_redb:: error:: StoreError :: from) ?,
905897 ) ;
906898 let store = RedbStore :: new (
907899 db,
908900 wallet_name. as_deref ( ) . unwrap_or ( "wallet1" ) . to_string ( ) ,
909- )
910- . map_err ( PersisterError :: from) ?;
901+ ) ?;
911902 log:: debug!( "Redb database opened successfully" ) ;
912903 Persister :: RedbStore ( store)
913904 }
0 commit comments