Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ getSvInfoByParty app sv = do
None -> fail $ "Not a sv: " <> show sv
Some info -> pure info

getHostedSvInfoByParty : AmuletApp -> Party -> Script HostedSvInfo
getHostedSvInfoByParty app sv = do
[(_, rules)] <- query @DsoRules app.dso
case Map.lookup sv (fromOptional Map.empty rules.hostedSvs) of
None -> fail $ "Not a hosted sv: " <> show sv
Some info -> pure info

generateUnclaimedReward : AmuletApp -> AmuletUser -> Script ()
generateUnclaimedReward app provider1 = do
submit (actAs app.dso <> actAs provider1.primaryParty) $ createCmd AppRewardCoupon with
Expand Down
Loading
Loading