private List <RemoveExchangeOffer> LoadOffers(JObject tx)
        {
            List <RemoveExchangeOffer> list = new List <RemoveExchangeOffer>();

            if (tx["offers"] != null)
            {
                list = tx["offers"].Select(i => new RemoveExchangeOffer(
                                               new MosaicId(i["mosaicId"].ToObject <UInt64DTO>().ToUInt64()),
                                               ExchangeOfferTypeExtension.GetRawValue(i["type"].ToObject <int>())

                                               )).ToList();
            }

            return(list);
        }
示例#2
0
        private List <ExchangeOffer> LoadOffers(JObject tx, NetworkType network)
        {
            List <ExchangeOffer> list = new List <ExchangeOffer>();

            if (tx["offers"] != null)
            {
                list = tx["offers"].Select(i => new ExchangeOffer(
                                               new MosaicId(i["mosaicId"].ToObject <UInt64DTO>().ToUInt64()),
                                               i["mosaicAmount"].ToObject <UInt64DTO>().ToUInt64(),
                                               i["cost"].ToObject <UInt64DTO>().ToUInt64(),
                                               ExchangeOfferTypeExtension.GetRawValue(i["type"].ToObject <int>()),
                                               new PublicAccount(i["owner"].ToObject <string>(), network)
                                               )).ToList();
            }

            return(list);
        }