Transaction takes forever

There is a similar discussion here.

ethers.js has a similar function.

To try this you will have to use ethers.js or web3.js directly. If it does work for you then any transactions will naturally revert/fail if there’s not enough balance.

Your pending transaction issues seems unrelated though, you can try setting higher gas.