-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #338 from digital-asset/0.1.x-fix-matching-timestamp
change matching engine timeMatched to match exberry timestamp
- Loading branch information
Showing
2 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
module Utils where | ||
|
||
import DA.Time | ||
import DA.Date | ||
import Daml.Trigger | ||
|
||
type ContractPair a = (ContractId a, a) | ||
|
||
-- |Helper function to exercise a choice | ||
emitExerciseCmd : (Template t, Choice t c r) => ContractId t -> c -> TriggerA s CommandId | ||
emitExerciseCmd cid c = emitCommands [exerciseCmd cid c] [toAnyContractId cid] | ||
|
||
getUnixTimestamp : TriggerA s Int | ||
getUnixTimestamp = convertRelTimeToMicroseconds . (flip subTime) (time (date 1970 Jan 1) 0 0 0) <$> getTime | ||
|