How to use the nahmii-sdk.MonetaryAmount function in nahmii-sdk

To help you get started, we’ve selected a few nahmii-sdk 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 hubiinetwork / hubii-core / src / containers / WalletTransfer / index.js View on Github external
sendNahmii(symbol, toAddress, amount) {
    const { supportedAssets } = this.props;
    let ct;
    if (symbol === 'ETH') {
      ct = '0x0000000000000000000000000000000000000000';
    } else {
      ct = supportedAssets.get('assets').find((a) => a.get('symbol') === symbol).get('currency');
    }
    const monetaryAmount = new nahmii.MonetaryAmount(amount, ct);
    this.props.nahmiiTransfer(monetaryAmount, toAddress);
  }