Skip to content

Commit

Permalink
btc fix serde default height
Browse files Browse the repository at this point in the history
  • Loading branch information
fbsobreira committed Dec 15, 2023
1 parent 43c8317 commit d354b4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/kos-sdk/src/chains/bitcoin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ mod tests {
#[test]
fn test_get_balance() {
let balance = tokio_test::block_on(BTC::get_balance(
"34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo",
"12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S",
None,
None,
))
Expand Down
4 changes: 2 additions & 2 deletions packages/kos-sdk/src/chains/bitcoin/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ mod tests {
let amount = BigNumber::from_string("20000000").unwrap();
let list = tokio_test::block_on(select_utxos(
node,
"34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo",
"12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S",
&amount,
0,
0,
Expand Down Expand Up @@ -182,7 +182,7 @@ mod tests {

// get all utxos
let list = tokio_test::block_on(fetch_utxos(
"https://bitcoin.blockbook.chains.klever.io",
"https://btc1.trezor.io",
"34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo",
0,
))
Expand Down
1 change: 1 addition & 0 deletions packages/kos-sdk/src/chains/bitcoin/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ pub struct UTXO {
pub txid: String,
pub vout: u32,
pub value: String,
#[serde(default)]
pub height: u64,
pub confirmations: u64,
}
Expand Down

0 comments on commit d354b4d

Please sign in to comment.