Skip to content

Commit bbbfbfb

Browse files
committed
fix: Remove deposit from delegated amount for drep info endpoint
Signed-off-by: William Hankins <[email protected]>
1 parent 63356b1 commit bbbfbfb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/rest_blockfrost/src/handlers/governance.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ pub async fn handle_single_drep_blockfrost(
119119
let raw_sum = context.message_bus.request(&accounts_query_topic, sum_msg).await?;
120120
let sum_response = Arc::try_unwrap(raw_sum).unwrap_or_else(|arc| (*arc).clone());
121121

122-
let sum = match sum_response {
122+
let amount = match sum_response {
123123
Message::StateQueryResponse(StateQueryResponse::Accounts(
124124
AccountsStateQueryResponse::AccountsBalancesSum(sum),
125-
)) => sum,
125+
)) => sum.to_string(),
126126

127127
Message::StateQueryResponse(StateQueryResponse::Accounts(
128128
AccountsStateQueryResponse::Error(e),
@@ -141,8 +141,6 @@ pub async fn handle_single_drep_blockfrost(
141141
}
142142
};
143143

144-
let amount = (sum + response.info.deposit).to_string();
145-
146144
let response = DRepInfoREST {
147145
drep_id: drep_id.to_string(),
148146
hex: hex::encode(credential.get_hash()),

0 commit comments

Comments
 (0)