How to fix: "Gas estimation errored with the following message (see below)". [Safemoon Fork]

Hello, seems like i am that 1%... never lucky haha

Have a look at code here if youd like: https://pastebin.com/pRRXwZca .

I have tested on mainnet and testnet.
Any help is greatly appreciated!
Many thanks in advance :slight_smile: