Skip to content

Commit

Permalink
cargo fmt; bump sia-rust
Browse files Browse the repository at this point in the history
  • Loading branch information
Alrighttt committed Sep 13, 2024
1 parent 16f9b84 commit a46d854
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
18 changes: 12 additions & 6 deletions mm2src/coins/siacoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ use std::sync::{Arc, Mutex};

// TODO consider if this is the best way to handle wasm vs native
#[cfg(not(target_arch = "wasm32"))]
use sia_rust::http::client::native::NativeClient as SiaClientType;
#[cfg(not(target_arch = "wasm32"))]
use sia_rust::http::client::native::ClientConf as SiaClientConf;
#[cfg(not(target_arch = "wasm32"))]
use sia_rust::http::client::native::NativeClient as SiaClientType;

#[cfg(target_arch = "wasm32")]
use sia_rust::http::client::wasm::Client as SiaClientType;
Expand Down Expand Up @@ -1231,10 +1231,10 @@ mod tests {
#[cfg(all(test, target_arch = "wasm32"))]
mod wasm_tests {
use super::*;
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;
use common::log::info;
use common::log::wasm_log::register_wasm_log;
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;

use url::Url;

Expand All @@ -1248,10 +1248,16 @@ mod wasm_tests {

let conf = SiaClientConf {
base_url: Url::parse("https://sia-walletd.komodo.earth/").unwrap(),
headers: HashMap::new(),
headers: HashMap::new(),
};
let client = SiaClientType::new(conf).await.unwrap();

client.address_balance(Address::from_str("addr:1599ea80d9af168ce823e58448fad305eac2faf260f7f0b56481c5ef18f0961057bf17030fb3").unwrap()).await.unwrap();
client
.address_balance(
Address::from_str("addr:1599ea80d9af168ce823e58448fad305eac2faf260f7f0b56481c5ef18f0961057bf17030fb3")
.unwrap(),
)
.await
.unwrap();
}
}
5 changes: 3 additions & 2 deletions mm2src/mm2_main/tests/docker_tests/sia_docker_tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use common::block_on;
use sia_rust::http::client::native::{ClientConf, NativeClient};
use sia_rust::http::client::ApiClient;
use sia_rust::http::client::native::{NativeClient, ClientConf};
use sia_rust::http::endpoints::{AddressBalanceRequest, GetAddressUtxosRequest, ConsensusTipRequest, TxpoolBroadcastRequest};
use sia_rust::http::endpoints::{AddressBalanceRequest, ConsensusTipRequest, GetAddressUtxosRequest,
TxpoolBroadcastRequest};
use sia_rust::spend_policy::SpendPolicy;
use sia_rust::transaction::{SiacoinOutput, V2TransactionBuilder};
use sia_rust::types::{Address, Currency};
Expand Down

0 comments on commit a46d854

Please sign in to comment.