Skip to content

Commit

Permalink
[APP-781] Update neutron vesting amount calculating
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwonhyukjoon committed Jun 27, 2023
1 parent 1a43d61 commit 8c97c61
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import java.math.BigDecimal
data class ResVestingData(val allocated_amount: String?, val withdrawn_amount: String?, val schedule: Schedule?) {

fun getVestingAmount(): BigDecimal? {
return if (allocated_amount != null) {
BigDecimal(allocated_amount)
return if (allocated_amount != null && withdrawn_amount != null) {
BigDecimal(allocated_amount).subtract(BigDecimal(withdrawn_amount))
} else {
BigDecimal.ZERO
}
Expand Down

0 comments on commit 8c97c61

Please sign in to comment.