From d0c5283d1032c9feb7b780473bc4e10a6a5dfa8b Mon Sep 17 00:00:00 2001 From: Artem Date: Thu, 20 Jan 2022 15:13:08 +0300 Subject: [PATCH] Fix: market maker --- cmd/market_maker/tracker.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/market_maker/tracker.go b/cmd/market_maker/tracker.go index 525260e..cbfb48a 100644 --- a/cmd/market_maker/tracker.go +++ b/cmd/market_maker/tracker.go @@ -28,7 +28,9 @@ func (mm *MarketMaker) listenTracker(ctx context.Context) { current.Status = swap.Status current.Acceptor.Status = swap.Acceptor.Status current.Initiator.Status = swap.Initiator.Status - current.Secret = swap.Secret + if len(current.Secret) == 0 { + current.Secret = swap.Secret + } switch current.Status { case tools.StatusInitiated: @@ -43,7 +45,7 @@ func (mm *MarketMaker) listenTracker(ctx context.Context) { continue } - if current.Secret == "" { + if len(current.Secret) == 0 { mm.log.Error().Str("hashed_secret", current.HashedSecret.String()).Msg("empty secret before redeem") continue } @@ -64,7 +66,7 @@ func (mm *MarketMaker) listenTracker(ctx context.Context) { mm.log.Err(err).Msg("restoreSecretFromTrackerAtomex") continue } - if current.Secret == "" { + if len(current.Secret) == 0 { mm.log.Error().Str("hashed_secret", current.HashedSecret.String()).Msg("empty secret before refund") continue }