Skip to content

Commit

Permalink
map to OtherPsbtErr
Browse files Browse the repository at this point in the history
otherwise uniffi is giving a warning
  • Loading branch information
andreasgriffin committed Aug 29, 2024
1 parent 918dcda commit c877ced
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion bdk-ffi/src/bdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ interface PersistenceError {
[Error]
interface PsbtError {
InvalidMagic();
FinalizeError();
MissingUtxo();
InvalidSeparator();
PsbtUtxoOutOfBounds();
Expand Down
2 changes: 1 addition & 1 deletion bdk-ffi/src/bitcoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ impl Psbt {
let result = self.0.lock().unwrap().clone().finalize(&secp);
match result {
Ok(psbt) => Ok(Arc::new(Psbt::from(psbt))),
Err((_psbt, _errors)) => Err(PsbtError::FinalizeError),
Err((_psbt, _errors)) => Err(PsbtError::OtherPsbtErr),
}
}

Expand Down
3 changes: 0 additions & 3 deletions bdk-ffi/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,6 @@ pub enum PsbtError {
#[error("invalid magic")]
InvalidMagic,

#[error("finalize error with errors")]
FinalizeError,

#[error("UTXO information is not present in PSBT")]
MissingUtxo,

Expand Down

0 comments on commit c877ced

Please sign in to comment.