I tried making use of WalletConnect client on my NodeJS client using the following snippet:
import WalletConnect from "@walletconnect/client";
// Create a connector
const connector = new WalletConnect({
bridge: "https://bridge.walletconnect.org", // Required
});
// Check if connection is already established
if (!connector.connected) {
// create new session
connector.createSession();
}
The above code snippet works locally in development. It generates a deeplink uri which I call in other parts of my app and wallets like metamask, trust wallet connect successfully.
QRModal.open(connector.uri)
However, when I push the code to fly.io servers, although a deeplink url is generated and this uri still opens the respective wallets, the wallets don't connect to my app. The only helpful message I get is from trust wallet saying "Failed to Connect"