11import React from 'react' ;
22import t from 'prop-types' ;
3- import { useSelector } from 'react-redux' ;
43import styled from 'styled-components' ;
54import { Col , Form , Input } from 'antd' ;
65import { InputNumberWithAddons } from '~/adapters/antd' ;
7- import { selectAccount , selectChainId } from '~/features/web3/web3Slice' ;
6+
87import { InfoIcon } from '~/shared/icons' ;
98import PriceDefinitionInfographic from '~/shared/PriceDefinitionInfographic' ;
109import Spacer from '~/shared/Spacer' ;
1110import { getBestDisplayUnit } from '~/shared/EthValue' ;
11+ import { useWeb3 } from '~/hooks/useWeb3' ;
1212
1313export default function PriceDefinitionFieldsWrapper ( ) {
1414 return (
@@ -26,8 +26,7 @@ export default function PriceDefinitionFieldsWrapper() {
2626const MIN_REPRESENTABLE_VALUE = 0.000000000000000001 ;
2727
2828function PriceDefinitionFields ( { setFieldsValue, getFieldValue } ) {
29- const account = useSelector ( selectAccount ) ;
30- const chainId = useSelector ( selectChainId ) ;
29+ const { account, chainId } = useWeb3 ( ) ;
3130 const displayUnit = getBestDisplayUnit ( { chainId, amount : '0' } ) . suffix . short ;
3231
3332 const [ minMaxPriceNumeric , setMinMaxPriceNumeric ] = React . useState ( MIN_REPRESENTABLE_VALUE ) ;
0 commit comments