GemWallet / gemwallet-extension

GemWallet is a cutting-edge crypto wallet and Web3 layer for the XRP Ledger. Our browser extension enables you to interact with the XRP Ledger directly from your browser (Metamask for the XRPL). - https://gemwallet.app
https://gemwallet.app
Other
53 stars 20 forks source link

getNetwork closes window #359

Open guillaume-xrpl opened 6 months ago

guillaume-xrpl commented 6 months ago

Hi,

The code below pops the gem wallet into another window and quits unexpectedly without returning to the browser. When I switch back to the browser I see the data but it should be automatic as with other functions.

async getNetwork() {
    isInstalled().then((response) => {
        if (response.result.isInstalled) {
            getNetwork().then((response) => {
            this.network = response.result?.network;
            });
        } else {
            alert('Please install Gem wallet')
        }
    });         
},

Do you know why it's doing this?

I am using Google Chrome on a Macbook Pro.

Best.

FlorianBouron commented 6 months ago

Hi @guillaume-xrpl, Do you make sure that the GemWallet SDK is properly loaded before you run this code? Do you run this code with the CDN code or from the npm package?