How to use the @walletconnect/qrcode-modal.close function in @walletconnect/qrcode-modal

To help you get started, we’ve selected a few @walletconnect/qrcode-modal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WalletConnect / walletconnect-monorepo / packages / eth-provider / src / connection.ts View on Github external
this.wc.on('connect', (err: Error | null, payload: any) => {
      if (err) {
        this.emit('error', err)
        return
      }

      this.connected = true

      if (this.qrcode) {
        WCQRCode.close() // Close QR Code Modal
      }

      // Handle session update
      this.updateState(payload.params[0])

      // Emit connect event
      this.emit('connect')
    })
github WalletConnect / walletconnect-monorepo / packages / web3-subprovider / src / connection.ts View on Github external
this.wc.on('connect', (err: Error | null, payload: any) => {
      if (err) {
        this.emit('error', err)
        return
      }

      this.connected = true

      if (this.qrcode) {
        WCQRCode.close() // Close QR Code Modal
      }

      // Handle session update
      this.updateState(payload.params[0])

      // Emit connect event
      this.emit('connect')
    })
github WalletConnect / walletconnect-monorepo / packages / web3-provider / src / index.js View on Github external
wc.on('connect', (error, payload) => {
              if (this.qrcode) {
                WalletConnectQRCodeModal.close()
              }
              if (error) {
                this.isConnecting = false
                return reject(error)
              }
              this.isConnecting = false
              this.connected = true

              if (payload) {
                // Handle session update
                this.updateState(payload.params[0])
              }
              // Emit connect event
              this.emit('connect')

              this.triggerConnect(wc)
github trustwallet / platform / src / ui / components / App.tsx View on Github external
walletConnector.on('connect', (error: string) => {
    if (error) {
      console.log('Error on connect:' + error);
    }
    // Close QR Code Modal
    WalletConnectQRCodeModal.close();
  });
github trustwallet / platform / src / app / auth / services / providers / wallet-connect / wallet-connect.service.ts View on Github external
this.connector.on("connect", (error, payload) => {
            if (error) {
              result.error(error);
            }

            ignoreClose = true;

            // Close QR Code Modal
            WalletConnectQRCodeModal.close();

            result.next(true);
          });
          return result;
github loomnetwork / dashboard / src / store / ethereum / wallets / walletconnect.ts View on Github external
provider.wc.on('disconnect', (error, payload) => {
      if (error) {
        throw error
      }
      console.log("User cancel a sign-in request")
      WalletConnectQRCodeModal.close()
      provider.updateState({...INITIAL_STATE})
    })
github MyEtherWallet / MyEtherWallet / src / wallets / hybrid / WalletConnect / index.js View on Github external
this.walletConnect.on('connect', (error, payload) => {
        if (error) {
          throw error;
        }
        WalletConnectQRCodeModal.close();
        const { accounts, chainId } = payload.params[0];
        resolve(
          new MEWconnectWalletInterface(
            sanitizeHex(accounts[0]),
            this.isHardware,
            this.identifier,
            txSigner,
            msgSigner,
            this.walletConnect
          )
        );
        console.log(accounts, chainId, 'onConnect');
      });
    });
github WalletConnect / walletconnect-monorepo / packages / web3-subprovider / src / index.js View on Github external
walletConnector.on('connect', () => {
              if (this.qrcode) {
                WalletConnectQRCodeModal.close()
              }
              this.isConnecting = false
              this.triggerConnect(walletConnector)
              resolve(walletConnector)
            })
          })
github WalletConnect / walletconnect-example-dapp / src / App.tsx View on Github external
public onDisconnect = async () => {
    WalletConnectQRCodeModal.close();
    this.resetApp();
  };
github balance-io / balance-manager / src / reducers / _walletconnect.js View on Github external
walletConnector.on('connect', (error, payload) => {
    if (error) {
      throw error;
    }

    WalletConnectQRCodeModal.close();

    const { accounts, chainId } = payload.params[0];
    dispatch(
      walletConnectHandleSession({ newSession: true, accounts, chainId }),
    );
  });

@walletconnect/qrcode-modal

QR Code Modal for WalletConnect

Apache-2.0
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis

Popular @walletconnect/qrcode-modal functions