Skip to content

fix: adding usd_value back to trace event#5912

Merged
JackShort merged 1 commit into
mainfrom
jack/traceEvent
Feb 2, 2023
Merged

fix: adding usd_value back to trace event#5912
JackShort merged 1 commit into
mainfrom
jack/traceEvent

Conversation

@JackShort
Copy link
Copy Markdown
Contributor

  • accidentally removed usd_value adding it back

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
interface ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 2, 2023 at 2:02AM (UTC)

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: d41c2f0
Status: ✅  Deploy successful!
Preview URL: https://9a33f138.interface-y3o.pages.dev
Branch Preview URL: https://jack-traceevent.interface-y3o.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@cbachmeier cbachmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM non-blocking suggestion

const usdcValue = useStablecoinValue(inputCurrency ? swapTrade?.inputAmount : parsedAmount)
const traceEventProperties = {
usd_value: usdcValue?.toExact(),
...eventProperties,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The past in eventsProperty is instantiated in Bag but only ever passed down. To reduce BagFooter args you could instantiate here and include the usd_value

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually it still needs to be passed down because the other event properties come from the items in the bag that aren't being passed to the footer

@JackShort JackShort merged commit 93a4f00 into main Feb 2, 2023
@JackShort JackShort deleted the jack/traceEvent branch February 2, 2023 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants