Skip to content

Commit

Permalink
Merge branch '2.0' into feat/rent-cost
Browse files Browse the repository at this point in the history
  • Loading branch information
DaughterOfMars authored Nov 14, 2023
2 parents 893ffe4 + 3f451d4 commit 5454a3a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sdk/src/client/node_api/core/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,16 @@ impl ClientInner {
/// future rewards for those epochs. `epochStart` and `epochEnd` indicates the actual range for which reward value
/// is returned and decayed for.
/// GET /api/core/v3/rewards/{outputId}
pub async fn get_output_mana_rewards(&self, output_id: &OutputId) -> Result<ManaRewardsResponse> {
pub async fn get_output_mana_rewards(
&self,
output_id: &OutputId,
slot_index: impl Into<Option<SlotIndex>> + Send,
) -> Result<ManaRewardsResponse> {
let path = &format!("api/core/v3/rewards/{output_id}");

self.get_request(path, None, false, false).await
let query = query_tuples_to_query_string([slot_index.into().map(|i| ("slotIndex", i.to_string()))]);

self.get_request(path, query.as_deref(), false, false).await
}

// Committee routes.
Expand Down

0 comments on commit 5454a3a

Please sign in to comment.