subscribeBalance method
subscribe balance @return String msgChannel, call unsubscribeMessage(msgChannel) to unsub.
Implementation
Future<String> subscribeBalance(
String? address,
Function(BalanceData) onUpdate,
) async {
final msgChannel = 'Balance';
final code = 'account.getBalance(api, "$address", "$msgChannel")';
await apiRoot.service.webView!.subscribeMessage(
code, msgChannel, (data) => onUpdate(BalanceData.fromJson(data)));
return msgChannel;
}