Skip to content

Add STX to USD price conversion for tip values#178

Merged
Mosas2000 merged 2 commits intomainfrom
feature/stx-usd-conversion
Feb 26, 2026
Merged

Add STX to USD price conversion for tip values#178
Mosas2000 merged 2 commits intomainfrom
feature/stx-usd-conversion

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Summary

Display approximate USD values alongside STX amounts so users unfamiliar with Stacks can understand the real-world value of tips.

Changes

  • useStxPrice hook: Fetches STX/USD price from CoinGecko API with 60-second auto-refresh, exposes a toUsd() conversion function
  • SendTip component: Transaction breakdown now shows USD equivalents for tip amount and recipient net amount

USD values appear as (~$X.XX) alongside STX figures and gracefully hide when the price feed is unavailable.

Closes #68

Fetch STX price from CoinGecko API with 60-second auto-refresh.
Expose price, loading/error states, a toUsd conversion function,
and a manual refetch callback.
Show approximate USD values in the transaction breakdown for both
the tip amount and recipient net amount. Uses CoinGecko price feed
via useStxPrice hook with graceful fallback when price is unavailable.
@Mosas2000 Mosas2000 merged commit 2e658ac into main Feb 26, 2026
2 of 4 checks passed
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.

No STX to USD price conversion for displaying tip values

1 participant