Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
;; --------------------------------------------------------
;; 3.2-get-balance
;; --------------------------------------------------------
;; define a function get-balance that takes an argument id
;; uses with-read to view the id from the payments-table
;; bind the value of the balance and keyset of the given id to variables named balance and keyset
;; use enforce-one to check that the keyset of the user calling the function is either the admin-keyset or the keyset of the provided id
;; return balance