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

Use static fake ICP Swap prices instead of random #438

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

dskloetd
Copy link
Collaborator

@dskloetd dskloetd commented Jan 3, 2025

Motivation

In screenshot test in NNS dapp we need to mask out the dollar values because they differ per snapshot.
This makes testing tedious and reduces covergage.

Changes

  1. Provide static token prices in the fake ICP Swap response.

Tests

Tested manually. It results in 1 ICP being $9.00, 1 ckBTC being $90'000, 1 ckETH being $3'000, 1 ckUSDC being $1.00 and other tokens being $0.18 each.
While this is somewhat realistic, it's actually not important that these prices are realistic. Is just nice to have some variety in prices for testing.

@dskloetd dskloetd marked this pull request as ready for review January 3, 2025 09:46
@dskloetd dskloetd requested a review from a team as a code owner January 3, 2025 09:46
@dskloetd dskloetd enabled auto-merge (squash) January 3, 2025 09:46
Copy link
Contributor

@yhabib yhabib left a comment

Choose a reason for hiding this comment

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

Thanks

@dskloetd dskloetd merged commit 373cc90 into main Jan 3, 2025
16 checks passed
@dskloetd dskloetd deleted the kloet/static-price branch January 3, 2025 10:01
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