Skip to content

Commit 57ba820

Browse files
committed
fmt changes
1 parent 5b08ea6 commit 57ba820

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

apps/fortuna/src/api.rs

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,13 @@ mod test {
586586

587587
// Parse the response as JSON
588588
let configs: Vec<ChainConfigSummary> = response.json();
589-
589+
590590
// Verify the response structure - should be empty for test server
591-
assert_eq!(configs.len(), 0, "Should return empty configs for test server");
591+
assert_eq!(
592+
configs.len(),
593+
0,
594+
"Should return empty configs for test server"
595+
);
592596
}
593597

594598
#[tokio::test]
@@ -736,20 +740,32 @@ mod test {
736740

737741
// Parse the response as JSON
738742
let configs: Vec<ChainConfigSummary> = response.json();
739-
743+
740744
// Verify we have 2 chains
741745
assert_eq!(configs.len(), 2, "Should return 2 chain configs");
742-
746+
743747
// Find ethereum config
744-
let eth_config = configs.iter().find(|c| c.name == "ethereum").expect("Ethereum config not found");
745-
assert_eq!(eth_config.contract_addr, "0x0000000000000000000000000000000000001234");
748+
let eth_config = configs
749+
.iter()
750+
.find(|c| c.name == "ethereum")
751+
.expect("Ethereum config not found");
752+
assert_eq!(
753+
eth_config.contract_addr,
754+
"0x0000000000000000000000000000000000001234"
755+
);
746756
assert_eq!(eth_config.reveal_delay_blocks, 1);
747757
assert_eq!(eth_config.gas_limit, 500000);
748758
assert_eq!(eth_config.fee, 1500000000000000);
749-
759+
750760
// Find avalanche config
751-
let avax_config = configs.iter().find(|c| c.name == "avalanche").expect("Avalanche config not found");
752-
assert_eq!(avax_config.contract_addr, "0x0000000000000000000000000000000000005678");
761+
let avax_config = configs
762+
.iter()
763+
.find(|c| c.name == "avalanche")
764+
.expect("Avalanche config not found");
765+
assert_eq!(
766+
avax_config.contract_addr,
767+
"0x0000000000000000000000000000000000005678"
768+
);
753769
assert_eq!(avax_config.reveal_delay_blocks, 2);
754770
assert_eq!(avax_config.gas_limit, 600000);
755771
assert_eq!(avax_config.fee, 2000000000000000);

apps/fortuna/src/api/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ pub struct ChainConfigSummary {
1313
pub fee: u128,
1414
}
1515

16-
pub async fn get_chain_configs(State(state): State<ApiState>) -> Result<Json<Vec<ChainConfigSummary>>, RestError> {
16+
pub async fn get_chain_configs(
17+
State(state): State<ApiState>,
18+
) -> Result<Json<Vec<ChainConfigSummary>>, RestError> {
1719
let mut configs = Vec::new();
1820
for (name, chain) in state.config.chains.iter() {
1921
configs.push(ChainConfigSummary {

0 commit comments

Comments
 (0)