From 81b57a1b5a3fb9652171c12180c5ed852cf13bd7 Mon Sep 17 00:00:00 2001 From: jeffyanta Date: Mon, 13 Jul 2026 13:49:30 -0400 Subject: [PATCH] OnSwapSubmitted integration callback now includes amount --- ocp/integration/swap.go | 2 +- ocp/rpc/transaction/stateless_swap.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ocp/integration/swap.go b/ocp/integration/swap.go index 8f0d731..88f57e9 100644 --- a/ocp/integration/swap.go +++ b/ocp/integration/swap.go @@ -10,7 +10,7 @@ import ( // Swap is an integration that hooks into the swap worker type Swap interface { // OnSwapSubmitted allows for notification when the swap for when a swap is submitted - OnSwapSubmitted(ctx context.Context, owner *common.Account, fromMint, toMint *common.Account) error + OnSwapSubmitted(ctx context.Context, owner *common.Account, fromMint, toMint *common.Account, amount uint64) error // OnSwapFinalized allows for notifications based on events processed by the swap worker OnSwapFinalized(ctx context.Context, owner *common.Account, isBuy bool, mint *common.Account, currencyName string, region currency.Code, valueReceived float64) error diff --git a/ocp/rpc/transaction/stateless_swap.go b/ocp/rpc/transaction/stateless_swap.go index c66da39..5acafb8 100644 --- a/ocp/rpc/transaction/stateless_swap.go +++ b/ocp/rpc/transaction/stateless_swap.go @@ -351,7 +351,7 @@ func (s *transactionServer) handleStablecoinStatelessSwap( // Section: Submission // - err = s.swapIntegration.OnSwapSubmitted(ctx, owner, fromMint, toMint) + err = s.swapIntegration.OnSwapSubmitted(ctx, owner, fromMint, toMint, initiateStablecoinSwapReq.SwapAmount) if err != nil { log.With(zap.Error(err)).Warn("failed to notify user of swap processing") }