test: add avalanche test (#1494)

This commit is contained in:
Matthias Seitz 2022-07-24 03:19:19 +02:00 committed by GitHub
parent aa008727ee
commit 12292dd920
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 2 deletions

View File

@ -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
}
@ -624,7 +624,6 @@ mod tests {
None,
)
.await;
dbg!(&txs);
assert!(txs.is_ok());
})
.await
@ -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());
}
}