diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9e602f451..14e99dab05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad #v1.4.2 with: - packages: git-restore-mtime libgtk-3-dev libwebkit2gtk-4.0-dev + packages: git-restore-mtime libgtk-3-dev libwebkit2gtk-4.1-dev version: 1.0 - name: Set up Go diff --git a/client/core/trade.go b/client/core/trade.go index fc3584caa5..c2b797ba13 100644 --- a/client/core/trade.go +++ b/client/core/trade.go @@ -2879,6 +2879,26 @@ func (c *Core) sendRedeemAsync(t *trackedTrade, match *matchTracker, coinID, sec }, }) } + if errors.As(err, &msgErr) && msgErr.Code == msgjson.RPCUnknownMatch { + oid := t.ID() + c.log.Warnf("DEX %s did not report active match %s on order %s - assuming revoked, status %v.", + t.dc.acct.host, match, oid, match.Status) + // We must have missed the revoke notification. Flag to allow recovery + // and subsequent retirement of the match and parent trade. + match.MetaData.Proof.SelfRevoked = true + if err := c.db.UpdateMatch(&match.MetaMatch); err != nil { + c.log.Errorf("Failed to update missing/revoked match: %v", err) + } + + if t.maybeReturnCoins() { + c.updateAssetBalance(t.wallets.fromWallet.AssetID) + } + + numMissing := 1 + subject, details := c.formatDetails(TopicMissingMatches, + numMissing, makeOrderToken(t.token()), t.dc.acct.host) + c.notify(newOrderNote(TopicMissingMatches, subject, details, db.ErrorLevel, t.coreOrderInternal())) + } err = fmt.Errorf("error sending 'redeem' message: %w", err) return }