Hi
I have integrate Torus Wallet According to docs (https://docs.tor.us/). I am facing the issue when i refresh the page it not reconnecting
Please share the below information:
- SDK along with version
- Platform
- Error message along with Console logs
- Your implementation code
- Dapp URL(if applicable)
Hi @ vjgee
Iâm using this NPM â@toruslabs/torus-embedâ. I have connected my app with torus login. Its not automatically reconnecting when I refresh the web-app. We have the login module Integrated with the wallet connect in our application, because of this the users need to login each time and connect their wallet which is not feasible for our project flow. Hoping to get a prompt response in this matter.
Hi @maharshi
Here is my code . when I refresh the page torus wallet is not reconnecting automatically. if there is any function for auto connect in torus wallet (like metamask) please do let me know ASAP. Thanks for your support. Hope I can get a prompt response.
export const TorUs = async (type, configchainid) => {
console.log(âtype,configchainidâ, type, configchainid);
const torus = new Torus();
console.log(âTorusWalletConnectâ, torus);
await torus.init({
enableLogging: true,
network: {
host: âhttps://polygon-mainnet.infura.io/v3/a67347b6179câ, // mandatory
networkName: âPolygon Mainnetâ,
chainId: 137,
blockExplorer: âhttps://polygonscan.com/â,
ticker: âMATICâ,
tickerName: âMATICâ,
},
showTorusButton: true,
logoDark: Darklogo, // Dark logo for light background
logoLight: Darklogo,
topupHide: false,
featuredBillboardHide: true,
disclaimerHide: true,
});
await torus.login();
if (torus) {
console.log(âtorusâ, torus);
var web3 = new Web3(torus.provider);
console.log(âtorus for Torusâ, web3);
const accounts = await web3.eth.getAccounts();
const ChainID = await web3.eth.getChainId();
console.log(âaccountssss torusâ, accounts, ChainID);
const account = accounts[0].toString().toLowerCase();
localStorage.setItem("Provider", web3)
localStorage.setItem("accountInfo", account)
localStorage.setItem('walletConnectType', type)
var weboe = {
web3: web3,
web3auth: torus
}
return weboe
}
}
hi @maharshi
Since there is no-reply from your side.
my user facing the issue
continue to app button is not working
And when i refreash the page tours wallet not reconnecting automatically
i have asked this many time from your side not getting reply properly . this basic functions are not working . i need solution to solve this
@vjgee @maharshi Hi all, are there any reply on this at all? It seems that chrome mobile works fine but chrome desktop is not working and does not redirect. Can someone help ue?
Please share the console logs that might help us to understand the situation youâre facing.
@vjgee @akashswamy
are we able to get into a call to solve this? I would also like to shre some video recording of the console too
@vjgee @maharshi @patrick @projectmanager
import Torus from â@toruslabs/torus-embedâ;
this is npm i used
this my package.json npm version
â@toruslabs/torus-embedâ: â^1.41.3â,
âreact-scriptsâ: â^5.0.1â,
âreactâ: â^18.1.0â,
âwebpackâ: â^5.88.2â,
âweb3â: â^1.7.4â,
this is my code to login torus wallet
export const TorUs = async (type, configchainid) => {
console.log(âtype,configchainidâ, type, configchainid);
const torus = new Torus();
console.log(âTorusWalletConnectâ, torus);
await torus.init({
enableLogging: true,
network: {
host: âhttps://polygon-mainnet.infura.io/v3/a6738b5a17514327ae8c9afc47b6179câ, // mandatory
networkName: âPolygon Mainnetâ,
chainId: 137, //0x89
blockExplorer: âhttps://polygonscan.com/â,
ticker: âMATICâ,
tickerName: âMATICâ,
},
showTorusButton: true,
logoDark: Darklogo, // Dark logo for light background
logoLight: Darklogo,
topupHide: false,
featuredBillboardHide: true,
disclaimerHide: true,
});
await torus.login();
if (torus) {
console.log(âtorusâ, torus);
var web3 = new Web3(torus.provider);
console.log(âtorus for Torusâ, web3);
const accounts = await web3.eth.getAccounts();
const ChainID = await web3.eth.getChainId();
console.log(âaccountssss torusâ, accounts, ChainID);
const account = accounts[0].toString().toLowerCase();
localStorage.setItem("Provider", web3)
localStorage.setItem("accountInfo", account)
localStorage.setItem('walletConnectType', type)
var weboe = {
web3: web3,
web3auth: torus
}
return weboe
}
}
when the click continue to app its not working. but sometimes working on chrome,its work fine firefox.
same mail vigneshkumarmrmaticz@gmail.com
it not working on chrome
but is working fine in firefox browser
in Chrome Continue to app button not working
Hey @akashswamy,
I see that the version you are using of torus-embed is older. Could you please try upgrading it? because as per the information you just gave, I believe Chromeâs latest update wouldâve broken the plugin.