Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

test: add avalanche test #1494

Merged
merged 1 commit into from
Jul 24, 2022
Merged
Changes from all commits
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
17 changes: 15 additions & 2 deletions ethers-etherscan/src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ mod tests {
.await;
assert!(balances.is_ok());
let balances = balances.unwrap();
assert!(balances.len() == 1);
assert_eq!(balances.len(), 1);
})
.await
}
Expand All @@ -624,7 +624,6 @@ mod tests {
None,
)
.await;
dbg!(&txs);
assert!(txs.is_ok());
})
.await
Expand Down Expand Up @@ -726,4 +725,18 @@ mod tests {
})
.await
}

#[tokio::test]
#[serial]
async fn get_avalanche_transactions() {
if std::env::var("SNOWTRACE_API_KEY").is_err() {
// nothing to do if api key unset
return
}
let client = Client::new_from_env(Chain::Avalanche).unwrap();
let txs = client
.get_transactions(&"0x1549ea9b546ba9ffb306d78a1e1f304760cc4abf".parse().unwrap(), None)
.await;
assert!(txs.is_ok());
}
}