Skip to content

Commit

Permalink
account lookup testnet test added
Browse files Browse the repository at this point in the history
  • Loading branch information
volovyks committed Apr 22, 2023
1 parent ad957c9 commit 5949a4e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion mpc-recovery/src/leader_node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,12 +569,22 @@ mod tests {
use super::*;

#[test]
fn test_get_acc_id_from_pk() {
fn test_get_acc_id_from_pk_mainnet() {
let url = "https://api.kitwallet.app".to_string();
let public_key: PublicKey = "ed25519:2uF6ZUghFFUg3Kta9rW47iiJ3crNzRdaPD2rBPQWEwyc"
.parse()
.unwrap();
let first_account = get_acc_id_from_pk(public_key, url).unwrap();
assert_eq!(first_account.to_string(), "serhii.near".to_string());
}

#[test]
fn test_get_acc_id_from_pk_testnet() {
let url = "https://testnet-api.kitwallet.app".to_string();
let public_key: PublicKey = "ed25519:7WYR7ifUbdVo2soQCvzAHnfdGfDhUhF8Und5CKZYK9b8"
.parse()
.unwrap();
let first_account = get_acc_id_from_pk(public_key, url).unwrap();
assert_eq!(first_account.to_string(), "serhii.testnet".to_string());
}
}

0 comments on commit 5949a4e

Please sign in to comment.