Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve fee explainer informations #8896

Merged
merged 4 commits into from
Feb 20, 2025
Merged

fix: improve fee explainer informations #8896

merged 4 commits into from
Feb 20, 2025

Conversation

NeOMakinG
Copy link
Collaborator

Description

  • Add copies for the different breakdowns of discounts so if one of the is selected, texts are adapted to reflect the current discount applied
  • Fix the total amount of discount in the fee explainer modal because it was taking in account discount decimals % but we apply BPS everywhere, it's not a calculateFees bug but a detail of our implementation so, no point to change anything in calculateFees but our final code consumer should adapt with how it consumes it
  • Also changed the style to show "Free" to the fee explainer to avoid $0.00 which was not sexy

To be done in a follow up:

  • Remove thorswap discount from our codebase

Issue (if applicable)

closes #8813

Risk

Low (presentational)

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

  • Change the FWH date so it's very close to the beginning
diff --git a/src/lib/fees/constant.ts b/src/lib/fees/constant.ts
index b922a6fc23..94fb66563e 100644
--- a/src/lib/fees/constant.ts
+++ b/src/lib/fees/constant.ts
@@ -1,7 +1,8 @@
 import { toBaseUnit } from 'lib/math'
 
 // This timestamp is the 12 of February 2025 10:30 PST
-export const FOX_WIF_HAT_CAMPAIGN_STARTING_TIME_MS = 1739385000000
+// export const FOX_WIF_HAT_CAMPAIGN_STARTING_TIME_MS = 1739385000000
+export const FOX_WIF_HAT_CAMPAIGN_STARTING_TIME_MS = 1740043392000
 
 // 120 days from the start
 export const FOX_WIF_HAT_CAMPAIGN_ENDING_TIME_MS =
  • It should show "Free" everywhere

Engineering

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

Very close date

image
image

1 week ago

image

@NeOMakinG NeOMakinG requested a review from a team as a code owner February 20, 2025 10:19
@gomesalexandre gomesalexandre self-requested a review February 20, 2025 10:49
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

With monkey:

image

Without monkey:

image

Nitpick @NeOMakinG if we want to tackle this here too: in swapper overview component, we should round (up for consistency) to 2dp as well, so we don't end up with a) a discrepancy and b) a weird .123 kind of amount, which isn't really a valid fiat amount the way one would think about it

image

@NeOMakinG
Copy link
Collaborator Author

With monkey:

image Without monkey: image Nitpick @NeOMakinG if we want to tackle this here too: in swapper overview component, we should round (up for consistency) to 2dp as well, so we don't end up with a) a discrepancy and b) a weird .123 kind of amount, which isn't really a valid fiat amount the way one would think about it image

Rounded up in d39f26b

@NeOMakinG NeOMakinG enabled auto-merge (squash) February 20, 2025 13:31
@NeOMakinG NeOMakinG merged commit 6a78184 into develop Feb 20, 2025
3 checks passed
@NeOMakinG NeOMakinG deleted the improve-discount branch February 20, 2025 13:40
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.

FWH discount makes it look like all shapeshift fees are free
3 participants