Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Haiss2 committed Jul 8, 2024
1 parent 7e11b36 commit 5ce242b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func TestSimple(t *testing.T) {
LogIndex: 198,
Timestamp: 1671614015000,
Expiry: 1719507125,
State: "new",
},
},
Success: true,
Expand All @@ -80,6 +81,7 @@ func TestSimple(t *testing.T) {
LogIndex: 202,
Timestamp: 1671614111000,
Expiry: 1719507125,
State: "new",
},
},
Success: true,
Expand Down
4 changes: 4 additions & 0 deletions pkg/storage/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ type TradeLogsQuery struct {
}

func (o *TradeLog) Serialize() []interface{} {
// set default state is new
if o.State == "" {
o.State = TradeLogStateNew
}
return []interface{}{
o.OrderHash,
strings.ToLower(o.Maker),
Expand Down

0 comments on commit 5ce242b

Please sign in to comment.