-
Notifications
You must be signed in to change notification settings - Fork 89
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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 :(
apps/cowswap-frontend/src/modules/usdAmount/updaters/UsdPricesUpdater.test.tsx
Outdated
Show resolved
Hide resolved
apps/cowswap-frontend/src/modules/usdAmount/updaters/UsdPricesUpdater.test.tsx
Outdated
Show resolved
Hide resolved
apps/cowswap-frontend/src/modules/usdAmount/updaters/UsdPricesUpdater.test.tsx
Outdated
Show resolved
Hide resolved
apps/cowswap-frontend/src/modules/usdAmount/updaters/UsdPricesUpdater.tsx
Outdated
Show resolved
Hide resolved
Maximum Sold: ${trade.fee?.feeAsCurrency && trade.maximumAmountIn(allowedSlippage).toExact()} | ||
` | ||
) | ||
function parseIndependentFieldURLParameter(urlParam: any): Field { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -15,11 +15,12 @@ import { | |||
switchCurrencies, | |||
typeInput, | |||
} from 'legacy/state/swap/actions' | |||
import { queryParametersToSwapState } from 'legacy/state/swap/hooks' |
There was a problem hiding this comment.
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
… 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
…l/cowswap into fix/fiat-amount-api-unit-tests
… fix/fiat-amount-api-unit-tests
No description provided.