Esempio n. 1
0
        public ResultWrapper <IEnumerable <Data> > eth_accounts()
        {
            var result = _blockchainBridge.GetKeyAddresses();

            if (result.Item2.ResultType == ResultType.Failure)
            {
                return(ResultWrapper <IEnumerable <Data> > .Fail($"Error while getting key addresses from keystore: {result.Item2.Error}"));
            }
            var data = result.Item1.Select(x => new Data(x.Hex)).ToArray();

            Logger.Debug($"eth_accounts request, result: {string.Join(", ", data.Select(x => x.Value.ToString()))}");
            return(ResultWrapper <IEnumerable <Data> > .Success(data));
        }