Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github workflows for audit, test and fmt #174

Merged
merged 3 commits into from
Jul 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix clippy warnings
  • Loading branch information
notmandatory committed Jul 25, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 49da6fcbaeaf3f3b437a3f2f58823c5aeba3ef14
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -490,7 +490,7 @@ impl TxBuilder {
}
thunderbiscuit marked this conversation as resolved.
Show resolved Hide resolved
}
if !&self.data.is_empty() {
tx_builder.add_data(&self.data.as_slice());
tx_builder.add_data(self.data.as_slice());
}

tx_builder
@@ -597,7 +597,7 @@ mod test {
.drain_wallet()
.drain_to(drain_to_address.clone());
//dbg!(&tx_builder);
assert_eq!(tx_builder.drain_wallet, true);
assert!(tx_builder.drain_wallet);
assert_eq!(tx_builder.drain_to, Some(drain_to_address));

let psbt = tx_builder.finish(&test_wallet).unwrap();
@@ -616,7 +616,7 @@ mod test {
.get(0)
.unwrap()
.value;
assert_eq!(input_value, 50_000 as u64);
assert_eq!(input_value, 50_000_u64);

// confirm one output to correct address with all sats - fee
assert_eq!(psbt.outputs.len(), 1);
@@ -636,6 +636,6 @@ mod test {
Address::from_str("tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt").unwrap()
);
let output_value = psbt.unsigned_tx.output.get(0).cloned().unwrap().value;
assert_eq!(output_value, 49_890 as u64); // input - fee
assert_eq!(output_value, 49_890_u64); // input - fee
}
}