public async Task <Promise> Get(int id, ApplicationUser user)
        {
            try
            {
                var promiseKeyHex = await SmartPromiseConverter.GetPromiseKeyHex(user.Address, id, _blockchain);

                var promiseJsonHex = await _blockchain.GetStorage(NETWORK_TYPE.TESTNET, promiseKeyHex);

                var promiseJson = SmartPromiseConverter.Hex2Str(promiseJsonHex);
                return(JsonConvert.DeserializeObject <Promise>(promiseJson));
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
        private async Task <IEnumerable <Promise> > LoadPromises(string[] keys)
        {
            var jsonPromisesHex = await Task.WhenAll(
                keys.Select(key => _blockchain.GetStorage(NETWORK_TYPE.TESTNET, key))
                );

            var promises = jsonPromisesHex.ToAsyncEnumerable().Select(p => {
                try
                {
                    return(JsonConvert.DeserializeObject <Promise>(SmartPromiseConverter.Hex2Str(p)));
                }
                catch (Exception)
                {
                    return(new Promise {
                        Title = "Error while loading. Please, try later.",
                        Content = "",
                        Complicity = 0,
                        Status = PROMISE_STATUS.ERROR
                    });
                }
            }).ToEnumerable();

            return(promises);
        }