Skip to content

Commit

Permalink
Merge pull request #66 from helius-labs/fix/api-endpoint
Browse files Browse the repository at this point in the history
fix: changed api mainnet endpoint
  • Loading branch information
0xIchigo authored Sep 18, 2024
2 parents 60d71ac + 5b5086c commit 35045a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/types/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ impl HeliusEndpoints {
rpc: "https://devnet.helius-rpc.com/".to_string(),
},
Cluster::MainnetBeta => HeliusEndpoints {
api: "https://api-mainnet.helius-rpc.com/".to_string(),
api: "https://api.helius-rpc.com/".to_string(),
rpc: "https://mainnet.helius-rpc.com/".to_string(),
},
Cluster::StakedMainnetBeta => HeliusEndpoints {
api: "https://api-mainnet.helius-rpc.com/".to_string(),
api: "https://api.helius-rpc.com/".to_string(),
rpc: "https://staked.helius-rpc.com/".to_string(),
},
}
Expand Down
6 changes: 3 additions & 3 deletions tests/test_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn test_factory_create_mainnet_instance() {
let helius: Helius = factory.create(Cluster::MainnetBeta).unwrap();

assert_eq!(helius.config.api_key, "valid_api_key");
assert_eq!(helius.config.endpoints.api, "https://api-mainnet.helius-rpc.com/");
assert_eq!(helius.config.endpoints.api, "https://api.helius-rpc.com/");
assert_eq!(helius.config.endpoints.rpc, "https://mainnet.helius-rpc.com/");
}

Expand All @@ -27,7 +27,7 @@ fn test_factory_create_staked_mainnet_instance() {
let helius: Helius = factory.create(Cluster::StakedMainnetBeta).unwrap();

assert_eq!(helius.config.api_key, "valid_api_key");
assert_eq!(helius.config.endpoints.api, "https://api-mainnet.helius-rpc.com/");
assert_eq!(helius.config.endpoints.api, "https://api.helius-rpc.com/");
assert_eq!(helius.config.endpoints.rpc, "https://staked.helius-rpc.com/");
}

Expand All @@ -40,6 +40,6 @@ fn test_factory_create_with_reqwest() {
.unwrap();

assert_eq!(helius.config.api_key, "valid_api_key");
assert_eq!(helius.config.endpoints.api, "https://api-mainnet.helius-rpc.com/");
assert_eq!(helius.config.endpoints.api, "https://api.helius-rpc.com/");
assert_eq!(helius.config.endpoints.rpc, "https://mainnet.helius-rpc.com/");
}

0 comments on commit 35045a9

Please sign in to comment.