Browse Source

BUG: show correct account operations

Herman Schoenfeld 7 years ago
parent
commit
18a92bff13
2 changed files with 4 additions and 8 deletions
  1. 1 1
      src/core.utils/UCoreUtils.pas
  2. 3 7
      src/core.utils/UDataSources.pas

+ 1 - 1
src/core.utils/UCoreUtils.pas

@@ -306,7 +306,7 @@ begin
   begin
     LList := TWallet.Keys.AccountsKeyList.AccountKeyList[i];
     for j := 0 to LList.Count - 1 do
-      LAccs.Add(j);
+      LAccs.Add(LList.Get(j));
   end;
   Result := LAccs.ToArray;
 end;

+ 3 - 7
src/core.utils/UDataSources.pas

@@ -417,21 +417,17 @@ begin
   try
     accountBlockOps := GC.AddObject(TOperationsResumeList.Create) as TOperationsResumeList;
     list := GC.AddObject(Classes.TList.Create) as Classes.TList;
-    for acc in FAccounts do
-    begin
+    for acc in FAccounts do begin
       // Load pending operations first
       list.Clear;
       accountBlockOps.Clear;
       Node.Operations.OperationsHashTree.GetOperationsAffectingAccount(acc, list);
       if list.Count > 0 then
-        for i := list.Count - 1 downto 0 do
-        begin
+        for i := list.Count - 1 downto 0 do begin
           Op := node.Operations.OperationsHashTree.GetOperation(PtrInt(list[i]));
-          if TPCOperation.OperationToOperationResume(0, Op, False, acc, OPR) then
-          begin
+          if TPCOperation.OperationToOperationResume(0, Op, False, acc, OPR) then begin
             OPR.NOpInsideBlock := i;
             OPR.Block := Node.Operations.OperationBlock.block;
-            ;
             OPR.Balance := Node.Operations.SafeBoxTransaction.Account(acc {Op.SignerAccount}).balance;
             AContainer.Add(OPR);
           end;