Error in withdrawing ASA from a smart contract

I keep geeting this error every time I try to withdraw from the contract
I’ve opted the contract into the token already

algosdk.error.AlgodHTTPError: TransactionPool.Remember: transaction KRKQFDKZ4ZFPXRRXPUKWFXKIMZS2PI3VKC44KNF5XDGVK2ODLRWA: logic eval error: invalid Asset reference 10458941. Details: pc=324, opcodes=bytec 4 // "assetId"
itxn_field XferAsset

Any help is well appreciated

I’ve been able to solve it
I didnt pass the assetId in the foreignassets array in the call to withdrawal