Skip to content

Commit 45f0685

Browse files
committed
Revert "set locked_amount to unvested_amount if none"
This reverts commit 149290e.
1 parent 149290e commit 45f0685

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

api/src/router.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ async fn get_eligibility(
361361
err
362362
})?;
363363

364-
let unvested_amount = state.cache.get_unvested_amount(user_pubkey.clone());
365364
Ok(Json(EligibilityResp {
366365
claimant: user_pubkey.clone(),
367366
merkle_tree: proof.merkle_tree,
@@ -371,13 +370,9 @@ async fn get_eligibility(
371370
proof: proof.proof,
372371
start_amount,
373372
end_amount: proof.amount as u128,
374-
locked_amount: if proof.locked_amount as u128 > 0 {
375-
proof.locked_amount as u128
376-
} else {
377-
unvested_amount
378-
},
373+
locked_amount: proof.locked_amount as u128,
379374
claimable_amount: claimable_amount as u128,
380-
unvested_amount,
375+
unvested_amount: state.cache.get_unvested_amount(user_pubkey),
381376
claimed_amount: (unlocked_amount_claimed + locked_amount_withdrawn) as u128,
382377
unlocked_amount_claimed: unlocked_amount_claimed as u128,
383378
locked_amount_withdrawn: locked_amount_withdrawn as u128,

0 commit comments

Comments
 (0)