Skip to content

Commit

Permalink
feat: track specific quote details in segment event
Browse files Browse the repository at this point in the history
  • Loading branch information
bigboydiamonds committed Aug 7, 2024
1 parent 50802f4 commit 1e634a8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/synapse-interface/pages/state-managed-bridge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,19 @@ const StateManagedBridge = () => {
if (rfqMaxAmountOut > nonRfqMaxAmountOut - maxDifference) {
quote = rfqQuote
} else {
quote = nonRfqQuote

segmentAnalyticsEvent(`[Bridge] use non-RFQ quote over RFQ`, {
rfqQuote,
nonRfqQuote,
bridgeModuleName: nonRfqQuote.bridgeModuleName,
originChainId: fromChainId,
originToken: fromToken.symbol,
originTokenAddress: fromToken.addresses[fromChainId],
destinationChainId: toChainId,
destinationToken: toToken.symbol,
destinationTokenAddress: toToken.addresses[toChainId],
rfqQuoteAmountOut: rfqQuote.maxAmountOut.toString(),
nonRfqMaxAmountOut: nonRfqQuote.maxAmountOut.toString(),
})
quote = nonRfqQuote
}
} else if (rfqQuote) {
quote = rfqQuote
Expand Down

0 comments on commit 1e634a8

Please sign in to comment.