From 709c9689a41918ea179023382140cbd5dc6e88cb Mon Sep 17 00:00:00 2001 From: Brian Stafford Date: Thu, 20 Feb 2025 05:51:38 -0600 Subject: [PATCH] review followup --- tatanka/client/trade/compat.go | 2 +- tatanka/tanka/swaps.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tatanka/client/trade/compat.go b/tatanka/client/trade/compat.go index 6ea7c3a389..3ee6e0a60c 100644 --- a/tatanka/client/trade/compat.go +++ b/tatanka/client/trade/compat.go @@ -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? diff --git a/tatanka/tanka/swaps.go b/tatanka/tanka/swaps.go index de71735c7c..bec2b17a7a 100644 --- a/tatanka/tanka/swaps.go +++ b/tatanka/tanka/swaps.go @@ -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) } @@ -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