Skip to content

Commit

Permalink
test(debug): console prints
Browse files Browse the repository at this point in the history
  • Loading branch information
envin3 committed Feb 19, 2024
1 parent f772e0e commit b8eb0c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/pages/swap/__test__/Swap.test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/first */
import { waitFor, render, screen, getByText, fireEvent } from '@testing-library/react'
import { waitFor, render, screen, getByText } from '@testing-library/react'
import UserEvent from '@testing-library/user-event'
import BigNumber from 'bignumber.js'
import { useCallback, useState } from 'react'
Expand Down
3 changes: 3 additions & 0 deletions src/hooks/use-swap.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ const useSwap = ({
function doSwap() {
updateSwapButton(swapButton.text === 'Swap' ? 'Swapping ...' : 'Generating ...', true)
sendEvent('swap_click', { asset_from: from.id, asset_to: to.id, from_amount: fromAmount })
console.log('swap', swap)
swap(from, to, fromAmount, address, {
pegoutToTelosEvmAddress,
})
Expand All @@ -225,8 +226,10 @@ const useSwap = ({
const swapAction = async () => {
try {
await waitForToS()
console.log('waitForTos')
if (!isReasonableAddress()) await waitForAddressWarning()
AddressWarningRef.current.proceed = false
console.log('doSwap')
doSwap()
} catch (err) {
if (err === 'Terms have been refused') {
Expand Down

0 comments on commit b8eb0c7

Please sign in to comment.