File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
stackslib/src/chainstate/stacks/boot Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change 35
35
;;
36
36
;; Returns `true` if the recipient was updated.
37
37
(define-public (update-recipient (new-recipient principal )) (begin
38
- (let
39
- (
40
- (old-recipient (var-get recipient ))
41
- )
38
+ (begin
42
39
(try! (validate-caller ))
43
- (var-set recipient new-recipient)
44
40
(print {
45
41
topic : " update-recipient" ,
46
- old-recipient : old- recipient,
42
+ old-recipient : ( var-get recipient ) ,
47
43
new-recipient : new-recipient,
48
44
})
49
- (ok true )
50
- )
45
+ (var-set recipient new-recipient )
46
+ ( ok true ) )
51
47
))
52
48
53
49
;; Transfer all currently withdrawable STX (vested + extra) to `recipient`.
71
67
)
72
68
73
69
(define-private (validate-caller )
74
- (begin
75
- (asserts! (is-eq contract-caller (var-get recipient )) (err ERR_NOT_ALLOWED))
76
- (asserts! (is-eq tx-sender (var-get recipient )) (err ERR_NOT_ALLOWED))
77
- (ok true ))
70
+ (if (is-eq (var-get recipient ) contract-caller tx-sender )
71
+ (ok true )
72
+ (err ERR_NOT_ALLOWED))
78
73
)
79
74
80
75
;; Returns the *total* vested amount at `burn-height`, i.e.
You can’t perform that action at this time.
0 commit comments