diff --git a/packages/ui-components/src/components/Wallet/Send.tsx b/packages/ui-components/src/components/Wallet/Send.tsx index a7c23322..a56e110e 100644 --- a/packages/ui-components/src/components/Wallet/Send.tsx +++ b/packages/ui-components/src/components/Wallet/Send.tsx @@ -306,7 +306,7 @@ const Send: React.FC = ({ } // normalize asset decimals if present - const normalizedBase = parseInt(value); + const normalizedBase = parseInt(value, 10); const normalizedValue = value.includes('.') && accountAsset.balance?.decimals ? `${normalizedBase}.${value diff --git a/packages/ui-components/src/components/Wallet/SendConfirm.tsx b/packages/ui-components/src/components/Wallet/SendConfirm.tsx index 6ef8d21e..f8945c29 100644 --- a/packages/ui-components/src/components/Wallet/SendConfirm.tsx +++ b/packages/ui-components/src/components/Wallet/SendConfirm.tsx @@ -16,7 +16,7 @@ import { getBlockchainSymbol, } from '../Manage/common/verification/types'; import {TitleWithBackButton} from './TitleWithBackButton'; -import {TokenEntry} from './Token'; +import type {TokenEntry} from './Token'; const useStyles = makeStyles()((theme: Theme) => ({ fullWidth: { diff --git a/packages/ui-components/src/components/Wallet/SubmitTransaction.tsx b/packages/ui-components/src/components/Wallet/SubmitTransaction.tsx index bce1f65f..145726f6 100644 --- a/packages/ui-components/src/components/Wallet/SubmitTransaction.tsx +++ b/packages/ui-components/src/components/Wallet/SubmitTransaction.tsx @@ -18,7 +18,7 @@ import { getBlockchainSymbol, } from '../Manage/common/verification/types'; import {OperationStatus} from './OperationStatus'; -import {TokenEntry} from './Token'; +import type {TokenEntry} from './Token'; const useStyles = makeStyles()((theme: Theme) => ({ fullWidth: { diff --git a/packages/ui-components/src/hooks/useSubmitTransaction.ts b/packages/ui-components/src/hooks/useSubmitTransaction.ts index 2af2450c..815fcb4a 100644 --- a/packages/ui-components/src/hooks/useSubmitTransaction.ts +++ b/packages/ui-components/src/hooks/useSubmitTransaction.ts @@ -12,7 +12,7 @@ import { getBlockchainSymbol, getRecordKeys, } from '../components/Manage/common/verification/types'; -import {TokenEntry} from '../components/Wallet/Token'; +import type {TokenEntry} from '../components/Wallet/Token'; import {TokenType} from '../lib'; import {notifyEvent} from '../lib/error'; import {FB_MAX_RETRY, FB_WAIT_TIME_MS} from '../lib/fireBlocks/client'; diff --git a/packages/ui-components/src/lib/wallet/evm/web3.ts b/packages/ui-components/src/lib/wallet/evm/web3.ts index 6dde6b17..fa79169c 100644 --- a/packages/ui-components/src/lib/wallet/evm/web3.ts +++ b/packages/ui-components/src/lib/wallet/evm/web3.ts @@ -1,10 +1,6 @@ import {erc20Abi} from 'abitype/abis'; import {Web3} from 'web3'; -export const getWeb3 = (providerUrl: string): Web3 => { - return new Web3(providerUrl); -}; - export const getContract = ( providerUrl: string, tokenAddress: string, @@ -25,3 +21,7 @@ export const getContractDecimals = async ( const decimals = await erc20Contract.methods.decimals.call([]).call(); return Number(decimals); }; + +export const getWeb3 = (providerUrl: string): Web3 => { + return new Web3(providerUrl); +};