mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
[Bug]: Enabling the display of token total in SetApprovalForAll (#18863)
This commit is contained in:
parent
67614593a8
commit
3fe5d3fc4c
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user