Skip to content

Commit adb2f5a

Browse files
authored
Kobe API: Avoid unwrap (#17)
1 parent 0846967 commit adb2f5a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/db_models/stake_pool_stats.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ impl StakePoolStatsStore {
8989
docs.push(doc);
9090
}
9191

92-
let new_stake_pool_stats = Self::calculate_moving_avg_apy(&docs, 10).unwrap();
93-
Ok(new_stake_pool_stats)
92+
Self::calculate_moving_avg_apy(&docs, 10).map_err(DataStoreError::StakePoolStatsError)
9493
}
9594

9695
/// Calculates moving average apy based on past num_epochs epochs

0 commit comments

Comments
 (0)