How to use the @zilliqa-js/util/dist/validation.isBech32 function in @zilliqa-js/util

To help you get started, we’ve selected a few @zilliqa-js/util 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 Zilliqa / nucleus-wallet / src / containers / faucet / index.tsx View on Github external
const changeToAddress = (e: React.ChangeEvent): void => {
    e.preventDefault();
    const value = e.target.value;
    const key = 'toAddress';
    const validationResult: any = getInputValidationState(key, value, isBech32(value));
    setToAddress(value);
    setToAddressValid(validationResult.toAddressValid);
    setToAddressInvalid(validationResult.toAddressInvalid);
  };
github Zilliqa / nucleus-wallet / src / components / send-form / index.tsx View on Github external
const changeToAddress = (e: React.ChangeEvent): void => {
    e.preventDefault();
    const value = e.target.value;
    const key = 'toAddress';
    const validationResult: any = getInputValidationState(key, value, isBech32(value));
    setToAddress(value);
    setToAddressValid(validationResult.toAddressValid);
    setToAddressInvalid(validationResult.toAddressInvalid);
  };