addressFromKeyStore method

Future addressFromKeyStore(
  1. int ss58, {
  2. required Map keyStore,
})

get address and avatar from KeyStore.

Implementation

Future<dynamic> addressFromKeyStore(int ss58, {required Map keyStore}) async {
  final String addressOld = keyStore['address'];
  final dynamic acc = await serviceRoot.webView!
      .evalJavascript('account.decodeAddress(["$addressOld"])'
          '.then(res => account.encodeAddress(Object.keys(res), [$ss58]))'
          '.then(res => account.genIcons(Object.values(res[$ss58])))');
  return acc;
}