diff --git a/libs/oeth/shared/src/components/AccountPopover.tsx b/libs/oeth/shared/src/components/AccountPopover.tsx index 4aa20e34f..8c0962399 100644 --- a/libs/oeth/shared/src/components/AccountPopover.tsx +++ b/libs/oeth/shared/src/components/AccountPopover.tsx @@ -44,6 +44,7 @@ export function AccountPopover({ anchor, setAnchor }: Props) { address, token: tokens.mainnet.ETH.address, enabled: isConnected, + watch: true, }); const { data: balances, isLoading: balancesLoading } = useContractReads({ contracts: balanceTokens.map((t) => ({ @@ -52,6 +53,8 @@ export function AccountPopover({ anchor, setAnchor }: Props) { functionName: 'balanceOf', args: [address], })), + watch: true, + enabled: isConnected, select: map(prop('result')), }); @@ -140,7 +143,7 @@ export function AccountPopover({ anchor, setAnchor }: Props) { {balanceTokens.map((tok, i) => ( diff --git a/libs/oeth/shared/src/components/GasPopover.tsx b/libs/oeth/shared/src/components/GasPopover.tsx index d9b471025..e89a61ed5 100644 --- a/libs/oeth/shared/src/components/GasPopover.tsx +++ b/libs/oeth/shared/src/components/GasPopover.tsx @@ -90,70 +90,70 @@ export function GasPopover({ }, }} > - + {intl.formatMessage({ defaultMessage: 'Slippage' })} - theme.palette.secondary.main, - backgroundColor: (theme) => - alpha(theme.palette.secondary.main, 0.05), - paddingInlineEnd: 2, - '& .MuiInputBase-input': { - textAlign: 'right', - color: 'primary.contrastText', + + theme.palette.secondary.main, + backgroundColor: (theme) => + alpha(theme.palette.secondary.main, 0.05), + paddingInlineEnd: 2, + '& .MuiInputBase-input': { + textAlign: 'right', + color: 'primary.contrastText', - '&::placeholder': { - color: 'text.primary', - opacity: 1, + '&::placeholder': { + color: 'text.primary', + opacity: 1, + }, }, - }, - }} - /> - - + }} + /> + + - {slippage > WARNING_THRESHOLD ? ( - theme.typography.pxToRem(12), - color: (theme) => theme.palette.warning.main, - fontWeight: 400, - fontStyle: 'normal', - }} - > - {intl.formatMessage({ - defaultMessage: 'Your transaction may be frontrun', - })} - - ) : null} + theme.typography.pxToRem(12), + color: (theme) => theme.palette.warning.main, + fontWeight: 400, + fontStyle: 'normal', + ...(slippage <= WARNING_THRESHOLD && { visibility: 'hidden' }), + }} + > + {intl.formatMessage({ + defaultMessage: 'Your transaction may be frontrun', + })} +