Browse Source

chore: remove unwraps cdk

thesimplekid 1 tháng trước cách đây
mục cha
commit
02c007440a
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      crates/cdk/src/wallet/swap.rs

+ 1 - 2
crates/cdk/src/wallet/swap.rs

@@ -225,8 +225,7 @@ impl Wallet {
             true => {
             true => {
                 let split_count = amount
                 let split_count = amount
                     .unwrap_or(Amount::ZERO)
                     .unwrap_or(Amount::ZERO)
-                    .split_targeted(&SplitTarget::default(), &fee_and_amounts)
-                    .unwrap()
+                    .split_targeted(&SplitTarget::default(), &fee_and_amounts)?
                     .len();
                     .len();
 
 
                 let fee_to_redeem = self
                 let fee_to_redeem = self