Skip to content

Commit 3549a27

Browse files
committed
cleanup
1 parent 6c8c34f commit 3549a27

File tree

1 file changed

+6
-7
lines changed
  • src/chain-wallet-libs/wallet/src/transaction

1 file changed

+6
-7
lines changed

src/chain-wallet-libs/wallet/src/transaction/builder.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,12 @@ impl<P: Payload> TransactionBuilder<P> {
101101
input: Input,
102102
witness_builder: B,
103103
) -> bool {
104-
match self.inputs.len().cmp(&255) {
105-
std::cmp::Ordering::Less => {
106-
self.inputs.push(input);
107-
self.witness_builders.push(Box::new(witness_builder));
108-
true
109-
}
110-
_ => false,
104+
if self.inputs().len() < 255 {
105+
self.inputs.push(input);
106+
self.witness_builders.push(Box::new(witness_builder));
107+
true
108+
} else {
109+
false
111110
}
112111
}
113112

0 commit comments

Comments
 (0)