Skip to content

bug: hardcoded stale XLM price used for fee-in-USD estimation #232

Description

@Austinaminu2

Problem

lib/fee-utils.ts:12,22 hardcodes XLM_PRICE = 0.12 for USD fee estimates. This is completely disconnected from the live price already fetched elsewhere in the app by hooks/use-token-price.ts.

Impact

The fee-in-USD figure shown to users (e.g. on the create-stream confirmation dialog) can be arbitrarily wrong whenever the real XLM price diverges from the hardcoded $0.12 — which it will, over time, as the price moves. Users may make decisions based on a stale/incorrect fee estimate.

Suggested fix

Reuse the live price already fetched by use-token-price.ts (or a shared price cache) instead of a hardcoded constant in fee-utils.ts, so both surfaces stay consistent and accurate.

Location

  • lib/fee-utils.ts:12,22
  • hooks/use-token-price.ts (existing live price source)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't workingfrontendNext.js frontend

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions