ERC721 get APPROVE of many ERC20

Hi , i try to develop smart contract that allow ERC721 to transfert many ERC20 i did :

function approveFromOtherContract(TokenERC20 token, address erc721_contract , uint256 amount) public returns (bool)
{
     token.approve(erc721_contract, amount);
     return true;
     
     
}

but its not working , is not showing the right view to metamask with approval …

Thank for your help

There’s a lot of context missing from your question, but from the name of the function (“approve from other contract”) I’ll say that the user needs to call approve itself, any indirection stops that from working.