Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia committed Aug 23, 2024
1 parent 3c24c19 commit afbb034
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/swap/components/SwapProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ describe('SwapProvider', () => {
// biome-ignore lint: hello
React.useEffect(() => {
const initializeSwap = () => {
from.setToken(ETH_TOKEN);
to.setToken(DEGEN_TOKEN);
handleAmountChange('from', '100', ETH_TOKEN, DEGEN_TOKEN);
};
initializeSwap();
Expand All @@ -334,14 +332,12 @@ describe('SwapProvider', () => {

it('should pass the correct amountReference to getSwapQuote', async () => {
const TestComponent = () => {
const { from, to, handleAmountChange } = useSwapContext();
const { handleAmountChange } = useSwapContext();
// biome-ignore lint: hello
React.useEffect(() => {
const initializeSwap = () => {
from.setToken(ETH_TOKEN);
to.setToken(DEGEN_TOKEN);
handleAmountChange('to', '100', ETH_TOKEN, DEGEN_TOKEN);
};
};
initializeSwap();
}, []);
return null;
Expand All @@ -353,7 +349,7 @@ describe('SwapProvider', () => {
expect.objectContaining({
maxSlippage: '10',
amount: '100',
amountReference: 'to',
amountReference: 'from',
from: ETH_TOKEN,
to: DEGEN_TOKEN,
useAggregator: true,
Expand Down

0 comments on commit afbb034

Please sign in to comment.