diff --git a/CHANGELOG.md b/CHANGELOG.md index 80d992df10a..7b51cd0d5c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - added: `chooseCaip19Asset` EdgeProvider API for precise wallet selection using CAIP-19 identifiers - added: Pass OS and app version details to core context for v2/coreRollup endpoint - changed: Append chain names to token codes in RampCreateScene +- fixed: Simplex buy/sell success status detection ## 4.42.0 (staging) diff --git a/src/plugins/ramps/simplex/simplexRampPlugin.ts b/src/plugins/ramps/simplex/simplexRampPlugin.ts index 0638fe3d737..3e52f04d1ea 100644 --- a/src/plugins/ramps/simplex/simplexRampPlugin.ts +++ b/src/plugins/ramps/simplex/simplexRampPlugin.ts @@ -689,8 +689,14 @@ export const simplexRampPlugin: RampPluginFactory = ( const orderId = link.query.orderId ?? 'unknown' const status = link.query.status?.replace('?', '') - - switch (status) { + const isTransactionApproved = link.uri.includes( + 'transaction-approved' + ) + const effectiveStatus = isTransactionApproved + ? 'success' + : status + + switch (effectiveStatus) { case 'success': { onLogEvent('Buy_Success', { conversionValues: {