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 Sep 5, 2024
1 parent c3c8fa8 commit 14f3b75
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 @@ -178,7 +178,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 @@ -174,7 +174,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 @@ -423,9 +423,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 14f3b75

Please sign in to comment.