Not sure if it will cancel on its own or not.
Swap stuck pending
Did you perform a swap or buy/sell? Swaps will automatically process. Buy/Sell will process when the other half of the trade is completed by another user. If it was a Buy/Sell you can manually cancel these if they have not processed yet.