Skip to content

Commit 5bdcee0

Browse files
committed
Fix wallet history sorting
1 parent 5114f10 commit 5bdcee0

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

src/Features/Blockcore.Features.Wallet/Database/WalletStore.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,12 @@ public IEnumerable<WalletHistoryData> GetAccountHistory(int accountIndex, bool e
162162
}
163163

164164
var historySpent = this.trxCol
165-
.Find(historySpentQuery,
166-
skip: skip,
167-
limit: take)
165+
.Find(historySpentQuery)
166+
// skip: skip,
167+
// limit: take)
168168
.OrderByDescending(x => x.SpendingDetails.CreationTime)
169+
.Skip(skip)
170+
.Take(take)
169171
.ToList();
170172

171173
Query historyUnSpentQuery = Query.EQ("AccountIndex", new BsonValue(accountIndex));
@@ -180,10 +182,12 @@ public IEnumerable<WalletHistoryData> GetAccountHistory(int accountIndex, bool e
180182

181183
var historyUnspent = this.trxCol
182184
.Find(
183-
historyUnSpentQuery,
184-
skip: skip,
185-
limit: take)
185+
historyUnSpentQuery)
186+
// skip: skip,
187+
// limit: take)
186188
.OrderByDescending(x => x.CreationTime)
189+
.Skip(skip)
190+
.Take(take)
187191
.ToList();
188192

189193
var items = new List<WalletHistoryData>();

src/Node/Blockcore.Node/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
},
7575
"XDS (MAIN/LOCAL)": {
7676
"commandName": "Project",
77-
"commandLineArgs": "--chain=XDS -server -rpcallowip=127.0.0.1 -rpcbind=127.0.0.1 -rpcpassword=rpcpassword -rpcuser=rpcuser -datadir=nodedata"
77+
"commandLineArgs": "--chain=XDS -server -rpcallowip=127.0.0.1 -rpcbind=127.0.0.1 -rpcpassword=rpcpassword -rpcuser=rpcuser "
7878
},
7979
"XDS (TEST/LOCAL)": {
8080
"commandName": "Project",

0 commit comments

Comments
 (0)