diff --git a/ui/components/app/confirm-page-container/confirm-page-container.component.js b/ui/components/app/confirm-page-container/confirm-page-container.component.js index 345ceb9e8..b4599292d 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container.component.js @@ -107,7 +107,7 @@ const ConfirmPageContainer = (props) => { const t = useI18nContext(); const trackEvent = useContext(MetaMetricsContext); - const [collectionBalance, setCollectionBalance] = useState(0); + const [collectionBalance, setCollectionBalance] = useState('0'); const isBuyableChain = useSelector(getIsBuyableChain); const contact = useSelector((state) => getAddressBookEntry(state, toAddress)); @@ -145,7 +145,7 @@ const ConfirmPageContainer = (props) => { fromAddress, global.ethereumProvider, ); - setCollectionBalance(tokenBalance?.balance?.words?.[0] || 0); + setCollectionBalance(tokenBalance.toString() || '0'); }, [fromAddress, tokenAddress]); ///: BEGIN:ONLY_INCLUDE_IN(snaps) @@ -310,7 +310,7 @@ const ConfirmPageContainer = (props) => { collectionName={title} senderAddress={fromAddress} name={fromName} - isERC721={assetStandard === TokenStandard.ERC20} + isERC721={assetStandard === TokenStandard.ERC721} total={collectionBalance} onSubmit={onSubmit} onCancel={onCancel}