Skip to content

Commit

Permalink
review followup
Browse files Browse the repository at this point in the history
  • Loading branch information
buck54321 committed Feb 20, 2025
1 parent 5a2ca32 commit 709c968
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tatanka/client/trade/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const (
ReasonTheirQtyTooSmall = "their order size is less than our lot size"
)

// OrderIsMatchable determines whether a given standling limit order is
// OrderIsMatchable determines whether a given standing limit order is
// matchable for our desired quantity and fee parameters.
func OrderIsMatchable(desiredQty uint64, theirOrd *tanka.Order, p *FeeParameters) (_ bool, reason string) {
// Can we satisfy their lot size?
Expand Down
4 changes: 2 additions & 2 deletions tatanka/tanka/swaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (ord *Order) ID() [32]byte {
}

func (ord *Order) Valid() error {
// Check whether the lot size is a power of 2, using binary ju-jitsu.
// Check whether the lot size is a power of 2, using binary jiu-jitsu.
if ord.LotSize&(ord.LotSize-1) != 0 {
return fmt.Errorf("lot size %d is not a power of 2", ord.LotSize)
}
Expand All @@ -65,7 +65,7 @@ func (ord *Order) Valid() error {
if ord.Rate == 0 {
return errors.New("order rate is zero")
}
if ord.Expiration.Equal(ord.Stamp) || ord.Expiration.Before(ord.Stamp) {
if !ord.Expiration.After(ord.Stamp) {
return errors.New("order is pre-expired")
}
return nil
Expand Down

0 comments on commit 709c968

Please sign in to comment.