mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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 t = useI18nContext();
|
||||||
const trackEvent = useContext(MetaMetricsContext);
|
const trackEvent = useContext(MetaMetricsContext);
|
||||||
|
|
||||||
const [collectionBalance, setCollectionBalance] = useState(0);
|
const [collectionBalance, setCollectionBalance] = useState('0');
|
||||||
|
|
||||||
const isBuyableChain = useSelector(getIsBuyableChain);
|
const isBuyableChain = useSelector(getIsBuyableChain);
|
||||||
const contact = useSelector((state) => getAddressBookEntry(state, toAddress));
|
const contact = useSelector((state) => getAddressBookEntry(state, toAddress));
|
||||||
@ -145,7 +145,7 @@ const ConfirmPageContainer = (props) => {
|
|||||||
fromAddress,
|
fromAddress,
|
||||||
global.ethereumProvider,
|
global.ethereumProvider,
|
||||||
);
|
);
|
||||||
setCollectionBalance(tokenBalance?.balance?.words?.[0] || 0);
|
setCollectionBalance(tokenBalance.toString() || '0');
|
||||||
}, [fromAddress, tokenAddress]);
|
}, [fromAddress, tokenAddress]);
|
||||||
|
|
||||||
///: BEGIN:ONLY_INCLUDE_IN(snaps)
|
///: BEGIN:ONLY_INCLUDE_IN(snaps)
|
||||||
@ -310,7 +310,7 @@ const ConfirmPageContainer = (props) => {
|
|||||||
collectionName={title}
|
collectionName={title}
|
||||||
senderAddress={fromAddress}
|
senderAddress={fromAddress}
|
||||||
name={fromName}
|
name={fromName}
|
||||||
isERC721={assetStandard === TokenStandard.ERC20}
|
isERC721={assetStandard === TokenStandard.ERC721}
|
||||||
total={collectionBalance}
|
total={collectionBalance}
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
|
Loading…
Reference in New Issue
Block a user