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

test(fiatAmount): test UsdPricesUpdater #3091

Merged
merged 52 commits into from
Sep 1, 2023

Conversation

shoom3301
Copy link
Collaborator

@shoom3301 shoom3301 commented Aug 30, 2023

No description provided.

…cowswap into fix/fiat-amount-api-2

# Conflicts:
#	apps/cowswap-frontend/src/modules/swap/containers/TradeSummary/index.tsx
@vercel
Copy link

vercel bot commented Aug 30, 2023

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

Name Status Preview Updated (UTC)
swap-dev ✅ Ready (Inspect) Visit Preview Aug 31, 2023 1:21pm

🌃 Cosmos ↗︎

Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Great tests!

Some comments.

Also, there's 1 test failing :(

Maximum Sold: ${trade.fee?.feeAsCurrency && trade.maximumAmountIn(allowedSlippage).toExact()}
`
)
function parseIndependentFieldURLParameter(urlParam: any): Field {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just moved functions from hooks.tsx using auto refactoring.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To fix circular dependency problem

Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you mean by auto refactoring?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

@@ -15,11 +15,12 @@ import {
switchCurrencies,
typeInput,
} from 'legacy/state/swap/actions'
import { queryParametersToSwapState } from 'legacy/state/swap/hooks'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here I broke Circular dependency.
reducer and hooks were in a circle

@shoom3301 shoom3301 marked this pull request as ready for review August 31, 2023 10:39
… fix/fiat-amount-api-2

# Conflicts:
#	apps/cowswap-frontend/src/common/hooks/useGetSurplusFiatValue.ts
#	apps/cowswap-frontend/src/common/hooks/useRateInfoParams.ts
#	apps/cowswap-frontend/src/common/pure/ExecutionPrice/hooks/useExecutionPriceFiat.ts
#	apps/cowswap-frontend/src/legacy/components/Tokens/FiatBalanceCell.tsx
#	apps/cowswap-frontend/src/legacy/hooks/usePriceImpact/useFiatValuePriceImpact.ts
#	apps/cowswap-frontend/src/modules/account/containers/AccountDetails/SurplusCard.tsx
#	apps/cowswap-frontend/src/modules/limitOrders/pure/ExecutionPriceTooltip/index.tsx
#	apps/cowswap-frontend/src/modules/swap/containers/SwapWidget/index.tsx
#	apps/cowswap-frontend/src/modules/swap/state/useSwapDerivedState.ts
#	apps/cowswap-frontend/src/modules/trade/containers/TradeBasicConfirmDetails/index.tsx
#	apps/cowswap-frontend/src/modules/trade/hooks/useBuildTradeDerivedState.ts
#	apps/cowswap-frontend/src/modules/trade/hooks/useTradeParsedAmounts.ts
#	apps/cowswap-frontend/src/modules/trade/updaters/PriceImpactUpdater.tsx
#	apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuoteFeeFiatAmount.ts
@shoom3301 shoom3301 changed the base branch from fix/fiat-amount-api-2 to develop August 31, 2023 13:15
@shoom3301 shoom3301 merged commit 91bc835 into develop Sep 1, 2023
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2023
@alfetopito alfetopito deleted the fix/fiat-amount-api-unit-tests branch September 5, 2023 10:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants