Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getBalance(addr: string): Promise> {
const address = validation.isBech32(addr) ? fromBech32Address(addr) : addr;
return this.provider.send(
RPCMethod.GetBalance,
address.replace('0x', '').toLowerCase(),
);
}