File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ async fn get_eligibility(
361361 err
362362 } ) ?;
363363
364+ let unvested_amount = state. cache . get_unvested_amount ( user_pubkey. clone ( ) ) ;
364365 Ok ( Json ( EligibilityResp {
365366 claimant : user_pubkey. clone ( ) ,
366367 merkle_tree : proof. merkle_tree ,
@@ -370,9 +371,13 @@ async fn get_eligibility(
370371 proof : proof. proof ,
371372 start_amount,
372373 end_amount : proof. amount as u128 ,
373- locked_amount : proof. locked_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+ } ,
374379 claimable_amount : claimable_amount as u128 ,
375- unvested_amount : state . cache . get_unvested_amount ( user_pubkey ) ,
380+ unvested_amount,
376381 claimed_amount : ( unlocked_amount_claimed + locked_amount_withdrawn) as u128 ,
377382 unlocked_amount_claimed : unlocked_amount_claimed as u128 ,
378383 locked_amount_withdrawn : locked_amount_withdrawn as u128 ,
You can’t perform that action at this time.
0 commit comments