From 593b3ac27e32aa3d46dd9325e834b8336d70ac02 Mon Sep 17 00:00:00 2001 From: jeffyanta Date: Tue, 7 Apr 2026 09:44:11 -0400 Subject: [PATCH] Fix expected state when marking currency as abandoned due to cancelled swap --- ocp/worker/swap/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ocp/worker/swap/util.go b/ocp/worker/swap/util.go index db4f676..96d4a04 100644 --- a/ocp/worker/swap/util.go +++ b/ocp/worker/swap/util.go @@ -163,7 +163,7 @@ func (p *runtime) markSwapCancelled(ctx context.Context, swapRecord *swap.Record if err != nil { return err } - err = p.validateCurrencyMetadataState(destinationCurrencyMetadataRecord, currency.MetadataStateWaitingForInitialPurchase, currency.MetadataStateAvailable) + err = p.validateCurrencyMetadataState(destinationCurrencyMetadataRecord, currency.MetadataStateFundingAuthority, currency.MetadataStateAvailable) if err != nil { return err } @@ -184,7 +184,7 @@ func (p *runtime) markSwapCancelled(ctx context.Context, swapRecord *swap.Record } if !common.IsCoreMint(toMint) { - if destinationCurrencyMetadataRecord.State == currency.MetadataStateWaitingForInitialPurchase { + if destinationCurrencyMetadataRecord.State == currency.MetadataStateFundingAuthority { destinationCurrencyMetadataRecord.State = currency.MetadataStateAbandoning err = p.data.SaveCurrencyMetadata(ctx, destinationCurrencyMetadataRecord) if err != nil {