/// <summary> /// get all unconfirmed transactions /// </summary> /// <param name="pageIndex"></param> /// <param name="limit"></param> /// <returns></returns> public async Task <object> GetUnconfirmTransactions(int pageIndex = 1, int limit = 100) { var tempTransactions = UnconfirmedTransactionCache.GetUnconfirmedTransactions(null, pageIndex, limit); var result = tempTransactions.Project(t => t.ToTransactionPreviewModel()); return(result); }
/// <summary> /// get my wallet unconfirmed transactions /// </summary> /// <returns></returns> public async Task <object> GetMyUnconfirmedTransactions(int pageIndex = 1, int limit = 100) { if (CurrentWallet == null) { return(Error(ErrorCode.WalletNotOpen)); } var addresses = CurrentWallet.GetAccounts().Select(a => a.ScriptHash).ToList(); var tempTransactions = UnconfirmedTransactionCache.GetUnconfirmedTransactions(addresses, pageIndex, limit); var result = tempTransactions.Project(t => t.ToTransactionPreviewModel()); return(result); }