Empty modal
See original GitHub issueHi! I have this code:
<script>
import { onMount } from "svelte";
import Web3 from "web3";
import Web3Modal from "web3modal";
import WalletConnectProvider from "@walletconnect/web3-provider";
let web3Modal;
let provider;
let web3;
const connect = async () => {
provider = await web3Modal.connect();
provider.on("accountsChanged", accounts => {
console.log(accounts);
});
provider.on("chainChanged", chainId => {
console.log(chainId);
});
provider.on("connect", info => {
console.log(info);
});
provider.on("disconnect", error => {
console.log(error);
});
web3 = new Web3(provider);
console.log(await web3.eth.getGasPrice())
web3.eth.getAccounts(console.log);
}
onMount(async () => {
const providerOptions = {
disableInjectedProvider: true,
// cacheProvider: false,
walletconnect: {
package: WalletConnectProvider,
options: {
infuraId: "<THE INFURA PROJECT ID>",
}
},
binancechainwallet: {
package: true
}
};
web3Modal = new Web3Modal(providerOptions)
})
</script>
<button class={ $$props.class } on:click={ connect }><slot>Connect</slot></button>
{ web3 }
When the button is clicked, the opacity of the screen changes but the modal doesn’t show Looking at the html you can see this:
<div id="WEB3_CONNECT_MODAL_ID">
<div class="sc-jRQBWg uYscM web3modal-modal-lightbox" offset="0" opacity="0.4">
<div class="sc-gKclnd fmSSut web3modal-modal-container">
<div class="sc-iCfMLu fFpYRP web3modal-modal-hitbox"></div>
<div class="sc-furwcr dKfWpB web3modal-modal-card"></div>
</div>
</div>
</div>
Sorry if this is a newbie issue but I don’t catch what is happening
Thanks
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:12
Top Results From Across the Web
How to reset the bootstrap modal when it gets closed and ...
I am using BS 3.3.7 and i have a problem when i open a modal then close it, the modal contents keep on...
Read more >Modal - Bootstrap
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >Clear Modal Form On Close - Material Design for Bootstrap
Hello, I have a modal form based on the examples, when a user partially completes the form but presses cancel to close the...
Read more >Clear Bootstrap Modal content after close. - Coderwall
This tells Bootstrap to clear everything on the close of the modal window, so you won't get cached content. Of course you need...
Read more >Create empty modal dialog box - MATLAB dialog - MathWorks
This MATLAB function creates an empty dialog box and returns d, a Figure object.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same issue when metamask is installed but not enabled, just an empty darker div
The bug is still here, ex : https://codesandbox.io/s/react-playground-forked-oo1wi8