torusresearch / torus-embed

Embeds the Torus Wallet directly in your application via torus-embed. Exposes a Web3 Provider.
https://demo-eth.tor.us
MIT License
84 stars 52 forks source link

topupHide does not hide the "Please top up your wallet" in the transaction modal #547

Open dnna opened 1 year ago

dnna commented 1 year ago

Describe the bug I init torus with the following code, that I would expect to disable the topup functionality:

await torus.init({
  network: {
    host: "https://rpc.bombchain.com",
    chainId: 2300,
    networkName: "BOMB Chain"
  },
  buildEnv: "production",
  enableLogging: true,
  whiteLabel: {
    theme: {
      isDark: true,
      colors: {},
    },
    logoDark: "https://raw.githubusercontent.com/bombmoney/bomb-assets/master/bomb-logo.png",
    logoLight: "https://raw.githubusercontent.com/bombmoney/bomb-assets/master/bomb-logo.png",
    topupHide: true,
    featuredBillboardHide: true,
    disclaimerHide: true,
  }
});

I then attempt to make a stake transaction for the wallet, which has no gas.

However, as seen in the screenshot below, the "Please top up your wallet" button still appears.

Clicking the button leads to an endless redirect loop that crashes the popup (which I would expect since its a custom chain, there is no native onramper to buy coins).

The ideal behavior here would be for the topup string to be hidden completely, since topupHide is true.

Screenshots image

chaitanyapotti commented 1 year ago

topupHide only hides the topup tab in the wallet popup. This button in screenshot is because user doesn't have funds for paying gas fees

dnna commented 1 year ago

OK, but this leads to a broken loop then (since its a custom chain, topup doesn't make sense with it). I take it there is no way to hide it?