Skip to content

Commit

Permalink
Fix: market maker
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Jan 20, 2022
1 parent f03b1b7 commit d0c5283
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/market_maker/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit d0c5283

Please sign in to comment.