Commit 76222905 authored by Ian Lapham's avatar Ian Lapham Committed by GitHub

update state org and get latest (#3073)

parent 22654440
import { Trans } from '@lingui/macro'
import { useAtomValue } from 'jotai/utils'
import { inputAtom, useUpdateInputToken, useUpdateInputValue } from 'lib/state/swap'
import styled, { ThemedText } from 'lib/theme'
import { ReactNode } from 'react'
import Column from '../Column'
import Row from '../Row'
import TokenImg from '../TokenImg'
import { inputAtom, useUpdateInputToken, useUpdateInputValue } from './state'
import TokenInput from './TokenInput'
const mockBalance = 123.45
......
......@@ -2,12 +2,12 @@ import { Trans } from '@lingui/macro'
import { atom } from 'jotai'
import { useAtomValue } from 'jotai/utils'
import useColor, { usePrefetchColor } from 'lib/hooks/useColor'
import { inputAtom, outputAtom, useUpdateInputToken, useUpdateInputValue } from 'lib/state/swap'
import styled, { DynamicThemeProvider, ThemedText } from 'lib/theme'
import { ReactNode, useMemo } from 'react'
import Column from '../Column'
import Row from '../Row'
import { inputAtom, outputAtom, useUpdateInputToken, useUpdateInputValue } from './state'
import TokenInput from './TokenInput'
export const colorAtom = atom<string | undefined>(undefined)
......
import { useAtom } from 'jotai'
import { ArrowDown as ArrowDownIcon, ArrowUp as ArrowUpIcon } from 'lib/icons'
import { stateAtom } from 'lib/state/swap'
import styled, { Layer } from 'lib/theme'
import { useCallback, useState } from 'react'
import Button from '../Button'
import Row from '../Row'
import { stateAtom } from './state'
const ReverseRow = styled(Row)`
bottom: -1.5em;
......
import { t, Trans } from '@lingui/macro'
import { useAtom } from 'jotai'
import { Check, LargeIcon } from 'lib/icons'
import { MaxSlippage, maxSlippageAtom } from 'lib/state/swap'
import styled, { ThemedText } from 'lib/theme'
import { ReactNode, useCallback, useRef } from 'react'
......@@ -8,7 +9,6 @@ import { BaseButton, TextButton } from '../../Button'
import Column from '../../Column'
import { DecimalInput, inputCss } from '../../Input'
import Row from '../../Row'
import { MaxSlippage, maxSlippageAtom } from '../state'
import { Label, optionCss } from './components'
const tooltip = (
......
import { Trans } from '@lingui/macro'
import { useAtom } from 'jotai'
import { mockTogglableAtom } from 'lib/state/swap'
import Row from '../../Row'
import Toggle from '../../Toggle'
import { mockTogglableAtom } from '../state'
import { Label } from './components'
export default function MockToggle() {
......
import { Trans } from '@lingui/macro'
import { useAtom } from 'jotai'
import { TRANSACTION_TTL_DEFAULT, transactionTtlAtom } from 'lib/state/swap'
import styled, { ThemedText } from 'lib/theme'
import { useRef } from 'react'
import Column from '../../Column'
import { inputCss, IntegerInput } from '../../Input'
import Row from '../../Row'
import { TRANSACTION_TTL_DEFAULT, transactionTtlAtom } from '../state'
import { Label } from './components'
const tooltip = <Trans>Your transaction will revert if it has been pending for longer than this period of time.</Trans>
......
......@@ -2,6 +2,7 @@ import { Trans } from '@lingui/macro'
import { useResetAtom } from 'jotai/utils'
import useScrollbar from 'lib/hooks/useScrollbar'
import { Settings as SettingsIcon } from 'lib/icons'
import { settingsAtom } from 'lib/state/swap'
import styled, { ThemedText } from 'lib/theme'
import React, { useState } from 'react'
......@@ -9,7 +10,6 @@ import { IconButton, TextButton } from '../../Button'
import Column from '../../Column'
import Dialog, { Header } from '../../Dialog'
import { BoundaryProvider } from '../../Popover'
import { settingsAtom } from '../state'
import MaxSlippageSelect from './MaxSlippageSelect'
import TransactionTtlInput from './TransactionTtlInput'
......
import { useUpdateAtom } from 'jotai/utils'
import { DAI, ETH } from 'lib/mocks'
import { transactionAtom } from 'lib/state/swap'
import { useEffect } from 'react'
import { useSelect } from 'react-cosmos/fixture'
import invariant from 'tiny-invariant'
import { Modal } from '../Dialog'
import { transactionAtom } from './state'
import { StatusDialog } from './Status'
function Fixture() {
......
......@@ -3,13 +3,13 @@ import { useAtomValue } from 'jotai/utils'
import ErrorDialog, { StatusHeader } from 'lib/components/Error/ErrorDialog'
import useInterval from 'lib/hooks/useInterval'
import { CheckCircle, Clock, Spinner } from 'lib/icons'
import { Transaction, transactionAtom } from 'lib/state/swap'
import styled, { ThemedText } from 'lib/theme'
import { useCallback, useMemo, useState } from 'react'
import ActionButton from '../../ActionButton'
import Column from '../../Column'
import Row from '../../Row'
import { Transaction, transactionAtom } from '../state'
import Summary from '../Summary'
const errorMessage = (
......
import { useUpdateAtom } from 'jotai/utils'
import { DAI, ETH } from 'lib/mocks'
import { Field, outputAtom, stateAtom } from 'lib/state/swap'
import { useEffect, useState } from 'react'
import { useValue } from 'react-cosmos/fixture'
import { Modal } from '../Dialog'
import { Field, outputAtom, stateAtom } from './state'
import { SummaryDialog } from './Summary'
function Fixture() {
......
import { t } from '@lingui/macro'
import { State } from 'lib/state/swap'
import { ThemedText } from 'lib/theme'
import { Token } from 'lib/types'
import { useMemo } from 'react'
import Row from '../../Row'
import { State } from '../state'
interface DetailProps {
label: string
......
import { ArrowRight } from 'lib/icons'
import { Input } from 'lib/state/swap'
import styled from 'lib/theme'
import { ThemedText } from 'lib/theme'
import { useMemo } from 'react'
......@@ -6,7 +7,6 @@ import { useMemo } from 'react'
import Column from '../../Column'
import Row from '../../Row'
import TokenImg from '../../TokenImg'
import { Input } from '../state'
const Percent = styled.span<{ gain: boolean }>`
color: ${({ gain, theme }) => (gain ? theme.success : theme.error)};
......
......@@ -3,6 +3,7 @@ import { useAtomValue } from 'jotai/utils'
import { IconButton } from 'lib/components/Button'
import useScrollbar from 'lib/hooks/useScrollbar'
import { Expando, Info } from 'lib/icons'
import { Input, inputAtom, outputAtom, swapAtom } from 'lib/state/swap'
import styled, { ThemedText } from 'lib/theme'
import { useMemo, useState } from 'react'
......@@ -11,7 +12,6 @@ import Column from '../../Column'
import { Header } from '../../Dialog'
import Row from '../../Row'
import Rule from '../../Rule'
import { Input, inputAtom, outputAtom, swapAtom } from '../state'
import Details from './Details'
import Summary from './Summary'
......
import { useAtom } from 'jotai'
import { useUpdateAtom } from 'jotai/utils'
import { inputAtom, outputAtom, swapAtom } from 'lib/state/swap'
import { useEffect } from 'react'
import { useValue } from 'react-cosmos/fixture'
import Swap from '.'
import { colorAtom } from './Output'
import { inputAtom, outputAtom, swapAtom } from './state'
const validateColor = (() => {
const validator = document.createElement('div').style
......
import { Trans } from '@lingui/macro'
import { useAtomValue } from 'jotai/utils'
import { inputAtom, outputAtom, swapAtom } from 'lib/state/swap'
import { useCallback, useMemo, useState } from 'react'
import ActionButton from '../ActionButton'
import Dialog from '../Dialog'
import { inputAtom, outputAtom, swapAtom } from './state'
import { StatusDialog } from './Status'
import { SummaryDialog } from './Summary'
......
import { Trans } from '@lingui/macro'
import { Input } from 'lib/state/swap'
import styled, { keyframes, ThemedText } from 'lib/theme'
import { Token } from 'lib/types'
import { FocusEvent, ReactNode, useCallback, useRef, useState } from 'react'
......@@ -8,7 +9,6 @@ import Column from '../Column'
import { DecimalInput } from '../Input'
import Row from '../Row'
import TokenSelect from '../TokenSelect'
import { Input } from './state'
const TokenInputRow = styled(Row)`
grid-template-columns: 1fr;
......
import { Trans } from '@lingui/macro'
import { useAtomValue } from 'jotai/utils'
import { AlertTriangle, Info, largeIconCss, Spinner } from 'lib/icons'
import { Field, Input, inputAtom, outputAtom, stateAtom, swapAtom } from 'lib/state/swap'
import styled, { ThemedText, ThemeProvider } from 'lib/theme'
import { useMemo, useState } from 'react'
......@@ -8,7 +9,6 @@ import { TextButton } from '../Button'
import Row from '../Row'
import Rule from '../Rule'
import Tooltip from '../Tooltip'
import { Field, Input, inputAtom, outputAtom, stateAtom, swapAtom } from './state'
const mockBalance = 123.45
......
import { SetStateAction } from 'jotai'
import { RESET, useUpdateAtom } from 'jotai/utils'
import { injectedAtom, networkAtom } from 'lib/state'
import { injectedAtom, networkAtom } from 'lib/state/web3'
import { ReactNode, useEffect, useMemo } from 'react'
import { initializeConnector, Web3ReactHooks } from 'widgets-web3-react/core'
import { EIP1193 } from 'widgets-web3-react/eip1193'
......
import { multicall } from 'lib/state'
import { multicall } from 'lib/state/web3'
export const {
useMultipleContractSingleData,
......
import { useAtomValue } from 'jotai/utils'
import { injectedAtom, networkAtom, Web3ReactState } from 'lib/state'
import { injectedAtom, networkAtom, Web3ReactState } from 'lib/state/web3'
import { Web3ReactHooks } from 'widgets-web3-react/core'
export function useActiveWeb3ReactState(): Web3ReactState {
......
......@@ -3,8 +3,8 @@ import { atomWithImmer } from 'jotai/immer'
import { useUpdateAtom } from 'jotai/utils'
import { atomWithReset } from 'jotai/utils'
import { ETH } from 'lib/mocks'
import { Customizable, pickAtom, setCustomizable, setTogglable } from 'lib/state/atoms'
import { Token } from 'lib/types'
import { Customizable, pickAtom, setCustomizable, setTogglable } from 'lib/utils/atoms'
import { useMemo } from 'react'
/** Max slippage, as a percentage. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment