How to use the @hathor/wallet-lib.walletApi function in @hathor/wallet-lib

To help you get started, we’ve selected a few @hathor/wallet-lib 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 HathorNetwork / hathor-wallet / src / components / TokenAdministrative.js View on Github external
updateTokenInfo = () => {
    this.setState({ errorMessage: '' });
    hathorLib.walletApi.getGeneralTokenInfo(this.props.token.uid, (response) => {
      if (response.success) {
        this.setState({
          totalSupply: response.total,
        });
      } else {
        this.setState({ errorMessage: response.message });
      }
    });
  }
github HathorNetwork / hathor-wallet / src / components / TokenAdministrative.js View on Github external
updateTokenInfo = () => {
    this.setState({ errorMessage: '' });
    hathorLib.walletApi.getGeneralTokenInfo(this.props.token.uid, (response) => {
      if (response.success) {
        this.setState({
          totalSupply: response.total,
        });
      } else {
        this.setState({ errorMessage: response.message });
      }
    });
  }
github HathorNetwork / hathor-wallet / src / components / TokenGeneralInfo.js View on Github external
updateTokenInfo = () => {
    this.setState({ errorMessage: '' });
    hathorLib.walletApi.getGeneralTokenInfo(this.props.token.uid, (response) => {
      if (response.success) {
        this.setState({
          totalSupply: response.total,
          canMint: response.mint.length > 0,
          canMelt: response.melt.length > 0,
          transactionsCount: response.transactions_count,
        });
      } else {
        this.setState({ errorMessage: response.message });
      }
    });
  }