Skip to content

Commit

Permalink
fix: moment lock event use UFix64 for times (#209)
Browse files Browse the repository at this point in the history
* add events for moment locking

* use ufix64 type in moment lock

---------

Co-authored-by: Taylor Petrychyn <[email protected]>
  • Loading branch information
tpetrychyn and Taylor Petrychyn authored Feb 23, 2023
1 parent 20b6046 commit 61fa554
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/go/events/moment_locked.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var (

type MomentLockedEvent interface {
FlowID() uint64
Duration() uint64
ExpiryTimestamp() uint64
Duration() cadence.UFix64
ExpiryTimestamp() cadence.UFix64
}

type momentLockedEvent cadence.Event
Expand All @@ -22,12 +22,12 @@ func (evt momentLockedEvent) FlowID() uint64 {
return uint64(evt.Fields[0].(cadence.UInt64))
}

func (evt momentLockedEvent) Duration() uint64 {
return uint64(evt.Fields[1].(cadence.UInt64))
func (evt momentLockedEvent) Duration() cadence.UFix64 {
return evt.Fields[1].(cadence.UFix64)
}

func (evt momentLockedEvent) ExpiryTimestamp() uint64 {
return uint64(evt.Fields[2].(cadence.UInt64))
func (evt momentLockedEvent) ExpiryTimestamp() cadence.UFix64 {
return evt.Fields[2].(cadence.UFix64)
}

func (evt momentLockedEvent) validate() error {
Expand Down

0 comments on commit 61fa554

Please sign in to comment.