We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
calc-claimable-amount
1 parent 55873fe commit 8e5292aCopy full SHA for 8e5292a
stackslib/src/chainstate/stacks/boot/sip-031.clar
@@ -45,15 +45,7 @@
45
(define-public (claim)
46
(let
47
(
48
- (balance (stx-get-balance (as-contract tx-sender)))
49
- (total-vested (calc-total-vested burn-block-height))
50
- ;; Portion of the initial mint that is *still* locked (not yet vested)
51
- (reserved (- INITIAL_MINT_AMOUNT total-vested))
52
- ;; Free balance = everything the caller may withdraw right now
53
- (claimable
54
- (if (> balance reserved)
55
- (- balance reserved)
56
- u0))
+ (claimable (calc-claimable-amount burn-block-height))
57
)
58
(try! (validate-caller))
59
(asserts! (> claimable u0) (err ERR_NOTHING_TO_CLAIM))
0 commit comments