@@ -1019,6 +1019,23 @@ impl From<BdkCreateWithPersistError<chain::rusqlite::Error>> for CreateWithPersi
1019
1019
}
1020
1020
}
1021
1021
1022
+ impl From < BdkCreateWithPersistError < PersistenceError > > for CreateWithPersistError {
1023
+ fn from ( error : BdkCreateWithPersistError < PersistenceError > ) -> Self {
1024
+ match error {
1025
+ BdkCreateWithPersistError :: Persist ( e) => CreateWithPersistError :: Persist {
1026
+ error_message : e. to_string ( ) ,
1027
+ } ,
1028
+ BdkCreateWithPersistError :: Descriptor ( e) => CreateWithPersistError :: Descriptor {
1029
+ error_message : e. to_string ( ) ,
1030
+ } ,
1031
+ // Objects cannot currently be used in enumerations
1032
+ BdkCreateWithPersistError :: DataAlreadyExists ( _e) => {
1033
+ CreateWithPersistError :: DataAlreadyExists
1034
+ }
1035
+ }
1036
+ }
1037
+ }
1038
+
1022
1039
impl From < AddUtxoError > for CreateTxError {
1023
1040
fn from ( error : AddUtxoError ) -> Self {
1024
1041
match error {
@@ -1248,6 +1265,21 @@ impl From<BdkLoadWithPersistError<chain::rusqlite::Error>> for LoadWithPersistEr
1248
1265
}
1249
1266
}
1250
1267
1268
+ impl From < BdkLoadWithPersistError < PersistenceError > > for LoadWithPersistError {
1269
+ fn from ( error : BdkLoadWithPersistError < PersistenceError > ) -> Self {
1270
+ match error {
1271
+ BdkLoadWithPersistError :: Persist ( e) => LoadWithPersistError :: Persist {
1272
+ error_message : e. to_string ( ) ,
1273
+ } ,
1274
+ BdkLoadWithPersistError :: InvalidChangeSet ( e) => {
1275
+ LoadWithPersistError :: InvalidChangeSet {
1276
+ error_message : e. to_string ( ) ,
1277
+ }
1278
+ }
1279
+ }
1280
+ }
1281
+ }
1282
+
1251
1283
impl From < BdkSqliteError > for PersistenceError {
1252
1284
fn from ( error : BdkSqliteError ) -> Self {
1253
1285
PersistenceError :: Reason {
0 commit comments