Ver código fonte

GUIExperimental builds into executable again.

1. Problem with TWizardForm<T> generic (seems) solved.
2. PascalCoinWalletExperimental.exe not tested yet libcrypto-1_1-x64 is
   missing.
3. Problem with other predicate generic is not yet solved. Therefore I
   do not recommend running this executable a this time or debug it
   cautiously.
4. Used TNode.GetPascalCoinDataFolder to fix TFolderHelper problems.
5. Search source code for "Skybuck" and/or "debug" and/or "check" to find
   sections of code that need to be tested/debugged (without the "") !
Skybuck 4 anos atrás
pai
commit
d29dd0ee97
27 arquivos alterados com 146 adições e 107 exclusões
  1. 1 1
      src/core/UOpTransaction.pas
  2. 18 18
      src/gui-experimental/UCTRLWallet.lfm
  3. 1 1
      src/gui-experimental/UCTRLWallet.pas
  4. 31 31
      src/gui-experimental/UFRMAccountExplorer.lfm
  5. 1 1
      src/gui-experimental/UFRMAccountExplorer.pas
  6. 23 11
      src/gui-experimental/UFRMOperation.pas
  7. 8 2
      src/gui-experimental/UFRMPascalCoinWalletConfig.pas
  8. 9 5
      src/gui-experimental/UUserInterface.pas
  9. 5 3
      src/gui-experimental/core.utils/UCoreUtils.pas
  10. 1 0
      src/gui-experimental/wizards/operations/UWIZBuyAccount_Details.pas
  11. 1 0
      src/gui-experimental/wizards/operations/UWIZChangeAccountInfo.pas
  12. 18 18
      src/gui-experimental/wizards/operations/UWIZChangeAccountInfo_Details.lfm
  13. 1 0
      src/gui-experimental/wizards/operations/UWIZChangeAccountInfo_Details.pas
  14. 1 1
      src/gui-experimental/wizards/operations/UWIZChangeKey.pas
  15. 1 0
      src/gui-experimental/wizards/operations/UWIZChangeKey_EnterKey.pas
  16. 1 0
      src/gui-experimental/wizards/operations/UWIZChangeKey_SelectKey.pas
  17. 1 0
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale.pas
  18. 1 0
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSeller.pas
  19. 1 1
      src/gui-experimental/wizards/operations/UWIZOperation.pas
  20. 1 0
      src/gui-experimental/wizards/operations/UWIZOperationConfirmation.pas
  21. 1 0
      src/gui-experimental/wizards/operations/UWIZOperationFee_Custom.pas
  22. 1 0
      src/gui-experimental/wizards/operations/UWIZOperationSelected.pas
  23. 1 0
      src/gui-experimental/wizards/operations/UWIZOperationSigner_Select.pas
  24. 1 0
      src/gui-experimental/wizards/operations/UWIZSendPASC_Details.pas
  25. 2 1
      src/gui-experimental/wizards/wallet/UWIZAddKey_ImportPubKey.pas
  26. 15 13
      src/libraries/sphere10/UWizard.pas
  27. BIN
      src/pascalcoin_wallet_classic.res

+ 1 - 1
src/core/UOpTransaction.pas

@@ -32,7 +32,7 @@ Uses UCrypto, UBlockChain, Classes, UAccounts, UBaseTypes,
 Type
   // Operations Type
   TOpTransactionStyle = (transaction, transaction_with_auto_buy_account, buy_account, transaction_with_auto_atomic_swap);
-    // transaction = Sinlge standard transaction
+    // transaction = Single standard transaction
     // transaction_with_auto_buy_account = Single transaction made over an account listed for private sale. For STORING purposes only
     // buy_account = A Buy account operation
     // transaction_with_auto_atomic_swap = Single transaction made over an account listed for atomic swap (coin swap or account swap)

+ 18 - 18
src/gui-experimental/UCTRLWallet.lfm

@@ -10,7 +10,7 @@ object CTRLWallet: TCTRLWallet
   ClientWidth = 1151
   OnCreate = FormCreate
   OnResize = FormResize
-  LCLVersion = '2.0.2.0'
+  LCLVersion = '2.0.10.0'
   object PairSplitter1: TPairSplitter
     Cursor = crDefault
     Left = 0
@@ -34,14 +34,14 @@ object CTRLWallet: TCTRLWallet
         Width = 344
         Anchors = [akTop, akLeft, akRight]
         Caption = 'Overview'
-        ClientHeight = 85
+        ClientHeight = 86
         ClientWidth = 340
         TabOrder = 0
         object Label1: TLabel
           Left = 16
-          Height = 15
+          Height = 14
           Top = 16
-          Width = 58
+          Width = 68
           Caption = 'Total PASC'
           Font.Style = [fsBold]
           ParentColor = False
@@ -49,9 +49,9 @@ object CTRLWallet: TCTRLWallet
         end
         object Label2: TLabel
           Left = 16
-          Height = 15
+          Height = 14
           Top = 48
-          Width = 59
+          Width = 69
           Caption = 'Total PASA'
           Font.Style = [fsBold]
           ParentColor = False
@@ -91,16 +91,16 @@ object CTRLWallet: TCTRLWallet
         Width = 344
         Anchors = [akTop, akLeft, akRight, akBottom]
         Caption = 'My Accounts'
-        ClientHeight = 420
+        ClientHeight = 421
         ClientWidth = 340
         TabOrder = 1
         object cbAccounts: TComboBox
           Left = 8
-          Height = 23
+          Height = 22
           Top = 8
           Width = 320
           Anchors = [akTop, akLeft, akRight]
-          ItemHeight = 15
+          ItemHeight = 14
           ItemIndex = 0
           Items.Strings = (
             'Show All'
@@ -114,7 +114,7 @@ object CTRLWallet: TCTRLWallet
         end
         object paAccounts: TPanel
           Left = 8
-          Height = 376
+          Height = 377
           Top = 40
           Width = 320
           Anchors = [akTop, akLeft, akRight, akBottom]
@@ -141,12 +141,12 @@ object CTRLWallet: TCTRLWallet
         Width = 776
         Anchors = [akTop, akLeft, akRight, akBottom]
         Caption = 'Recent Operations'
-        ClientHeight = 532
+        ClientHeight = 533
         ClientWidth = 772
         TabOrder = 0
         object paOperations: TPanel
           Left = 8
-          Height = 512
+          Height = 513
           Top = 16
           Width = 760
           Anchors = [akTop, akLeft, akRight, akBottom]
@@ -160,8 +160,8 @@ object CTRLWallet: TCTRLWallet
     end
   end
   object mnuAccountsPopup: TPopupMenu
-    left = 768
-    top = 64
+    Left = 768
+    Top = 64
     object miSendPASC: TMenuItem
       Caption = 'Send PASC'
       OnClick = miSendPASCClick
@@ -198,8 +198,8 @@ object CTRLWallet: TCTRLWallet
     end
   end
   object mnuOperationsPopup: TPopupMenu
-    left = 896
-    top = 64
+    Left = 896
+    Top = 64
     object miCopyOphash: TMenuItem
       Caption = 'Copy OPHASH'
       OnClick = miCopyOphashClick
@@ -213,7 +213,7 @@ object CTRLWallet: TCTRLWallet
     end
   end
   object mnuFirstAccountPopup: TPopupMenu
-    left = 1024
-    top = 64
+    Left = 1024
+    Top = 64
   end
 end

+ 1 - 1
src/gui-experimental/UCTRLWallet.pas

@@ -21,7 +21,7 @@ interface
 uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, Menus,
   ExtCtrls, PairSplitter, Buttons, UVisualGrid, UCommon, UCommon.UI, Generics.Collections,
-  ULog, UAccounts, UDataSources, UNode, UCoreObjects, UCoreUtils, UCTRLNoAccount;
+  ULog, UAccounts, UPCDataTypes, UDataSources, UNode, UCoreObjects, UCoreUtils, UCTRLNoAccount;
 
 type
 

+ 31 - 31
src/gui-experimental/UFRMAccountExplorer.lfm

@@ -5,16 +5,16 @@ object FRMAccountExplorer: TFRMAccountExplorer
   Width = 868
   ActiveControl = cbMyPrivateKeys
   Caption = 'Accounts Explorer'
-  ClientHeight = 431
+  ClientHeight = 432
   ClientWidth = 868
   Menu = meAccountExplorerMenu
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
-  LCLVersion = '2.0.2.0'
+  LCLVersion = '2.0.10.0'
   object Splitter1: TSplitter
     Left = 380
-    Height = 385
+    Height = 366
     Top = 66
     Width = 5
   end
@@ -30,34 +30,34 @@ object FRMAccountExplorer: TFRMAccountExplorer
     TabOrder = 0
     object Label18: TLabel
       Left = 11
-      Height = 15
+      Height = 14
       Top = 40
-      Width = 69
+      Width = 70
       Caption = 'Find account'
       ParentColor = False
     end
     object cbMyPrivateKeys: TComboBox
       Left = 308
-      Height = 23
+      Height = 22
       Top = 5
       Width = 411
-      ItemHeight = 15
+      ItemHeight = 14
       OnChange = cbMyPrivateKeysChange
       Style = csDropDownList
       TabOrder = 0
     end
     object cbExploreMyAccounts: TCheckBox
       Left = 11
-      Height = 19
+      Height = 18
       Top = 9
-      Width = 255
+      Width = 268
       Caption = 'Explore accounts with one of my Wallet Keys'
       OnChange = cbExploreMyAccountsChange
       TabOrder = 1
     end
     object ebFindAccountNumber: TEdit
       Left = 95
-      Height = 23
+      Height = 22
       Top = 33
       Width = 83
       OnChange = ebFindAccountNumberChange
@@ -75,16 +75,16 @@ object FRMAccountExplorer: TFRMAccountExplorer
     end
     object cbFilterAccounts: TCheckBox
       Left = 308
-      Height = 19
+      Height = 18
       Top = 35
-      Width = 157
+      Width = 161
       Caption = 'Filter accounts by balance'
       OnChange = cbFilterAccountsChange
       TabOrder = 4
     end
     object ebFilterAccountByBalanceMin: TEdit
       Left = 472
-      Height = 23
+      Height = 22
       Hint = 'Min balance'
       Top = 33
       Width = 83
@@ -94,7 +94,7 @@ object FRMAccountExplorer: TFRMAccountExplorer
     end
     object ebFilterAccountByBalanceMax: TEdit
       Left = 568
-      Height = 23
+      Height = 22
       Hint = 'Max balance'
       Top = 33
       Width = 83
@@ -140,17 +140,17 @@ object FRMAccountExplorer: TFRMAccountExplorer
   end
   object pnlAccounts: TPanel
     Left = 0
-    Height = 385
+    Height = 366
     Top = 66
     Width = 380
     Align = alLeft
     BevelOuter = bvNone
-    ClientHeight = 385
+    ClientHeight = 366
     ClientWidth = 380
     TabOrder = 1
     object dgAccounts: TDrawGrid
       Left = 0
-      Height = 351
+      Height = 332
       Top = 0
       Width = 380
       Align = alClient
@@ -164,7 +164,7 @@ object FRMAccountExplorer: TFRMAccountExplorer
     object pnlAccountsInfo: TPanel
       Left = 0
       Height = 34
-      Top = 351
+      Top = 332
       Width = 380
       Align = alBottom
       BevelOuter = bvNone
@@ -173,33 +173,33 @@ object FRMAccountExplorer: TFRMAccountExplorer
       TabOrder = 1
       object Label17: TLabel
         Left = 5
-        Height = 15
+        Height = 14
         Top = 10
-        Width = 53
+        Width = 55
         Caption = 'Accounts:'
         ParentColor = False
       end
       object Label19: TLabel
         Left = 136
-        Height = 15
+        Height = 14
         Top = 10
-        Width = 44
+        Width = 45
         Caption = 'Balance:'
         ParentColor = False
       end
       object lblAccountsCount: TLabel
         Left = 60
-        Height = 15
+        Height = 14
         Top = 10
-        Width = 18
+        Width = 21
         Caption = '000'
         ParentColor = False
       end
       object lblAccountsBalance: TLabel
         Left = 200
-        Height = 15
+        Height = 14
         Top = 10
-        Width = 18
+        Width = 21
         Caption = '000'
         ParentColor = False
       end
@@ -245,7 +245,7 @@ object FRMAccountExplorer: TFRMAccountExplorer
   end
   object pcAccountsOptions: TPageControl
     Left = 385
-    Height = 385
+    Height = 366
     Top = 66
     Width = 483
     ActivePage = tsAccountOperations
@@ -254,11 +254,11 @@ object FRMAccountExplorer: TFRMAccountExplorer
     TabOrder = 2
     object tsAccountOperations: TTabSheet
       Caption = 'Operations of selected Account'
-      ClientHeight = 357
+      ClientHeight = 339
       ClientWidth = 475
       object dgAccountOperations: TDrawGrid
         Left = 0
-        Height = 357
+        Height = 339
         Top = 0
         Width = 475
         Align = alClient
@@ -471,8 +471,8 @@ object FRMAccountExplorer: TFRMAccountExplorer
     end
   end
   object meAccountExplorerMenu: TMainMenu
-    left = 240
-    top = 16
+    Left = 240
+    Top = 16
     object miTools: TMenuItem
       Caption = 'Tools'
       object miNewOperation: TMenuItem

+ 1 - 1
src/gui-experimental/UFRMAccountExplorer.pas

@@ -25,7 +25,7 @@ interface
 uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
   ExtCtrls, StdCtrls, Buttons, Grids, Menus,
-  UCommon.UI, UBaseTypes, UGridUtils, UNode, UAccounts, UBlockChain;
+  UCommon.UI, UBaseTypes, UPCDataTypes, UGridUtils, UNode, UAccounts, UBlockChain;
 
 type
 

+ 23 - 11
src/gui-experimental/UFRMOperation.pas

@@ -143,7 +143,8 @@ type
     FNode : TNode;
     FWalletKeys: TWalletKeys;
     FDefaultFee: Int64;
-    FEncodedPayload : TRawBytes;
+//    FEncodedPayload : TRawBytes;
+    FOperationPayload : TOperationPayload;
     FDisabled : Boolean;
     FSenderAccounts: TOrderedCardinalList; // TODO: TOrderedCardinalList should be replaced with a "TCardinalList" since signer account should be processed last
     procedure SetWalletKeys(const Value: TWalletKeys);
@@ -201,6 +202,11 @@ Var errors : AnsiString;
   _newType : Word;
   _changeName, _changeType, _V2, _executeSigner  : Boolean;
   _senderAccounts : TCardinalsArray;
+  LNewAccountState : TAccountState;
+  LAccountTarget : cardinal;
+  LHashLock : T32Bytes;
+  lChangeData : boolean;
+  LNewData : TRawBytes;
 label loop_start;
 begin
   if Not Assigned(WalletKeys) then raise Exception.Create('No wallet keys');
@@ -252,7 +258,7 @@ loop_start:
         end;
         if dooperation then begin
           op := TOpTransaction.CreateTransaction(FNode.Bank.SafeBox.CurrentProtocol,
-          account.account,account.n_operation+1,destAccount.account,wk.PrivateKey,_amount,_fee,FEncodedPayload);
+          account.account,account.n_operation+1,destAccount.account,wk.PrivateKey,_amount,_fee,FOperationPayload);
           inc(_totalamount,_amount);
           inc(_totalfee,_fee);
         end;
@@ -272,11 +278,11 @@ loop_start:
           if uint64(_totalSignerFee) >= signerAccount.balance then _fee := 0
           else if signerAccount.balance - uint64(_totalSignerFee) > uint64(DefaultFee) then _fee := DefaultFee
           else _fee := signerAccount.balance - uint64(_totalSignerFee);
-          op := TOpChangeKeySigned.Create(FNode.Bank.SafeBox.CurrentProtocol,signerAccount.account,signerAccount.n_operation+_signer_n_ops+1,account.account,wk.PrivateKey,_newOwnerPublicKey,_fee,FEncodedPayload);
+          op := TOpChangeKeySigned.Create(FNode.Bank.SafeBox.CurrentProtocol,signerAccount.account,signerAccount.n_operation+_signer_n_ops+1,account.account,wk.PrivateKey,_newOwnerPublicKey,_fee,FOperationPayload);
           inc(_signer_n_ops);
           inc(_totalSignerFee, _fee);
         end else begin
-          op := TOpChangeKey.Create(FNode.Bank.SafeBox.CurrentProtocol,account.account,account.n_operation+1,account.account,wk.PrivateKey,_newOwnerPublicKey,_fee,FEncodedPayload);
+          op := TOpChangeKey.Create(FNode.Bank.SafeBox.CurrentProtocol,account.account,account.n_operation+1,account.account,wk.PrivateKey,_newOwnerPublicKey,_fee,FOperationPayload);
         end;
         inc(_totalfee,_fee);
         operationstxt := 'Change private key to '+TAccountComp.GetECInfoTxt(_newOwnerPublicKey.EC_OpenSSL_NID);
@@ -288,9 +294,11 @@ loop_start:
         if signerAccount.balance>DefaultFee then _fee := DefaultFee
         else _fee := signerAccount.balance;
         if (rbListAccountForPublicSale.Checked) then begin
-          op := TOpListAccountForSale.CreateListAccountForSale(FNode.Bank.SafeBox.CurrentProtocol,signerAccount.account,signerAccount.n_operation+1+iAcc, account.account,_salePrice,_fee,destAccount.account,CT_TECDSA_Public_Nul,0,wk.PrivateKey,FEncodedPayload);
+          LHashLock := CT_HashLock_NUL; // Skybuck: check or debug ! passed in function below !
+          // Skybuck: LNewAccountState parameter added, check or debug this later ! passed in function below !
+          op := TOpListAccountForSaleOrSwap.CreateListAccountForSaleOrSwap(FNode.Bank.SafeBox.CurrentProtocol, LNewAccountState, signerAccount.account,signerAccount.n_operation+1+iAcc, account.account,_salePrice,_fee, destAccount.account,CT_TECDSA_Public_Nul,0,wk.PrivateKey,LHashLock, FOperationPayload);
         end else if (rbListAccountForPrivateSale.Checked) then begin
-          op := TOpListAccountForSale.CreateListAccountForSale(FNode.Bank.SafeBox.CurrentProtocol,signerAccount.account,signerAccount.n_operation+1+iAcc, account.account,_salePrice,_fee,destAccount.account,_newOwnerPublicKey,_lockedUntil,wk.PrivateKey,FEncodedPayload);
+          op := TOpListAccountForSaleOrSwap.CreateListAccountForSaleOrSwap(FNode.Bank.SafeBox.CurrentProtocol, LNewAccountState, signerAccount.account,signerAccount.n_operation+1+iAcc, account.account,_salePrice,_fee, destAccount.account,_newOwnerPublicKey,_lockedUntil,wk.PrivateKey,LHashLock, FOperationPayload);
         end else raise Exception.Create('Select Sale type');
         {%endregion}
       end else if (PageControlOpType.ActivePage = tsDelist) then begin
@@ -299,21 +307,22 @@ loop_start:
         // Special fee account:
         if signerAccount.balance>DefaultFee then _fee := DefaultFee
         else _fee := signerAccount.balance;
-        op := TOpDelistAccountForSale.CreateDelistAccountForSale(FNode.Bank.SafeBox.CurrentProtocol,signerAccount.account,signerAccount.n_operation+1+iAcc,account.account,_fee,wk.PrivateKey,FEncodedPayload);
+        op := TOpDelistAccountForSale.CreateDelistAccountForSale(FNode.Bank.SafeBox.CurrentProtocol,signerAccount.account,signerAccount.n_operation+1+iAcc,account.account,_fee,wk.PrivateKey,FOperationPayload);
         {%endregion}
       end else if (PageControlOpType.ActivePage = tsBuyAccount) then begin
         {%region Operation: Buy Account}
         if Not UpdateOpBuyAccount(account,accountToBuy,_amount,_newOwnerPublicKey,errors) then raise Exception.Create(errors);
         op := TOpBuyAccount.CreateBuy(FNode.Bank.SafeBox.CurrentProtocol,account.account,account.n_operation+1,accountToBuy.account,accountToBuy.accountInfo.account_to_pay,
-          accountToBuy.accountInfo.price,_amount,_fee,_newOwnerPublicKey,wk.PrivateKey,FEncodedPayload);
+          accountToBuy.accountInfo.price,_amount,_fee,_newOwnerPublicKey,wk.PrivateKey,FOperationPayload);
         {%endregion}
       end else if (PageControlOpType.ActivePage = tsChangeInfo) then begin
         {%region Operation: Change Info}
         if not UpdateOpChangeInfo(account,signerAccount,_changeName,_newName,_changeType,_newType,errors) then raise Exception.Create(errors);
         if signerAccount.balance>DefaultFee then _fee := DefaultFee
         else _fee := signerAccount.balance;
+        // Skybuck: check or debug LChangeData and LNewData !!
         op := TOpChangeAccountInfo.CreateChangeAccountInfo(FNode.Bank.SafeBox.CurrentProtocol,signerAccount.account,signerAccount.n_operation+1,account.account,wk.PrivateKey,false,CT_TECDSA_Public_Nul,
-           _changeName,_newName,_changeType,_newType,_fee,FEncodedPayload);
+           _changeName,_newName,_changeType,_newType,LChangeData,LNewData,_fee,FOperationPayload);
         {%endregion}
       end else begin
         raise Exception.Create('No operation selected');
@@ -1246,7 +1255,8 @@ Var payload_u : AnsiString;
 begin
   valid := false;
   payload_encrypted := Nil;
-  FEncodedPayload := Nil;
+//  FEncodedPayload := Nil;  // Skybuck: old/deprecated
+  FOperationPayload.payload_raw := nil;
   errors := 'Unknown error';
   payload_u := memoPayload.Lines.Text;
   try
@@ -1349,7 +1359,9 @@ begin
       lblEncryptionErrors.Caption := errors;
       lblPayloadLength.Caption := Format('(%db -> ?)',[length(payload_u)]);
     end;
-    FEncodedPayload := payload_encrypted;
+//    FEncodedPayload := payload_encrypted; // Skybuck: old/deprecated
+    FOperationPayload.payload_raw := payload_encrypted;
+
     Result := valid;
   end;
 end;

+ 8 - 2
src/gui-experimental/UFRMPascalCoinWalletConfig.pas

@@ -84,7 +84,7 @@ type
 
 implementation
 
-uses UConst, USettings, UAccounts, ULog, UCrypto, UFolderHelper, UWallet, UUserInterface, UCommon;
+uses UConst, USettings, UAccounts, ULog, UCrypto, UFolderHelper, UWallet, UUserInterface, UCommon, UNode;
 
 {$R *.lfm}
 
@@ -135,7 +135,13 @@ end;
 
 procedure TFRMPascalCoinWalletConfig.bbOpenDataFolderClick(Sender: TObject);
 begin
-  OpenDocument(PChar(TFolderHelper.GetPascalCoinDataFolder))
+//  OpenDocument(PChar(TFolderHelper.GetPascalCoinDataFolder)) // Skybuck: old, don't work no more.
+  // Skybuck: two solutions possible:
+  // 1: TNode.GetPascalCoinDataFolder
+  // 2. TFolderHelper.GetDataFolder(CT_PascalCoin_Data_Folder
+
+  // Skybuck: I will try TNode first if this does not work use solution 2.
+  OpenDocument(PChar(TNode.GetPascalCoinDataFolder));
 end;
 
 procedure TFRMPascalCoinWalletConfig.bbUpdatePasswordClick(Sender: TObject);

+ 9 - 5
src/gui-experimental/UUserInterface.pas

@@ -342,8 +342,9 @@ begin
     FLog.SaveTypes := [];
 
     // Create data directories
-    If Not ForceDirectories(TFolderHelper.GetPascalCoinDataFolder) then
-      raise Exception.Create('Cannot create dir: '+TFolderHelper.GetPascalCoinDataFolder);
+    // Skybuck: using solution 1 for now: TNode.GetPascalCoinDataFolder
+    If Not ForceDirectories(TNode.GetPascalCoinDataFolder) then
+      raise Exception.Create('Cannot create dir: '+TNode.GetPascalCoinDataFolder);
 
     // Load settings
     TSettings.Load;
@@ -378,7 +379,8 @@ begin
 
     // Initialise Database
     FNode.Bank.StorageClass := TFileStorage;
-    TFileStorage(FNode.Bank.Storage).DatabaseFolder := TFolderHelper.GetPascalCoinDataFolder+PathDelim+'Data';
+    // skybuck: using solution 1 for now: TNode.GetPascalCoinDataFolder
+    TFileStorage(FNode.Bank.Storage).DatabaseFolder := TNode.GetPascalCoinDataFolder+PathDelim+'Data';
     TFileStorage(FNode.Bank.Storage).Initialize;
 
     // Reading database
@@ -616,7 +618,8 @@ begin
       FLog.SaveTypes := CT_TLogTypes_ALL
     else
       FLog.SaveTypes := CT_TLogTypes_DEFAULT;
-    FLog.FileName := TFolderHelper.GetPascalCoinDataFolder+PathDelim+'PascalCointWallet.log';
+    // Skybuck: Using solution 1 for now: TNode.GetPascalCoinDataFolder
+    FLog.FileName := TNode.GetPascalCoinDataFolder+PathDelim+'PascalCointWallet.log';
   end else begin
     FLog.SaveTypes := [];
     FLog.FileName := '';
@@ -631,7 +634,8 @@ begin
     finally
       FNode.UnlockMempoolWrite;
     end;
-    FNode.NodeLogFilename := TFolderHelper.GetPascalCoinDataFolder+PathDelim+'blocks.log';
+    // Skybuck: Using solution 1 for now: TNode.GetPascalCoinDataFolder
+    FNode.NodeLogFilename := TNode.GetPascalCoinDataFolder+PathDelim+'blocks.log';
   end;
   if Assigned(FPoolMiningServer) then begin
     if FPoolMiningServer.Port <> TSettings.MinerServerRpcPort then begin

+ 5 - 3
src/gui-experimental/core.utils/UCoreUtils.pas

@@ -1182,6 +1182,7 @@ var
   LCurrentAccount, LSignerAccount: TAccount;
   LOperationPayload : TOperationPayload;
   LANewAccountState : TAccountState;
+  LHashLock : T32Bytes;
 begin
 
   LWalletKeys := TWallet.Keys;
@@ -1252,15 +1253,16 @@ begin
         Exit(False);
       end;
 
+      LHashLock := CT_HashLock_NUL; // Skybuck: check or debug if this needs to be a parameter, calculated or if it can be a nil record. Passed below into function
+
       case AAccountSaleMode of
         akaPublicSale:
-
           LPCOperation := TOpListAccountForSaleOrSwap.CreateListAccountForSaleOrSwap(
             LNode.Bank.Safebox.CurrentProtocol,
-            LANewAccountState, // Skybuck not sure if this must be a parameter or acquired locally or left empty, for now adding to code.
+            LANewAccountState, // Skybuck: check or debug LANewAccountState, perhaps this needs to be a parameter in the above function header ?!?
             LSignerAccount.account, LSignerAccount.n_operation + 1 + LAccountIdx,
             LCurrentAccount.account, ASalePrice, LFee, ASellerAccount.account,
-            APublicKey, 0, LWalletKey.PrivateKey, CT_HashLock_NUL, LOperationPayload); // Skybuck: somebody check if hashlock can be a nil record
+            APublicKey, 0, LWalletKey.PrivateKey, LHashLock, LOperationPayload); // Skybuck: check or debug LHashLock ! Perhaps needs to be a parameter to above function header ?!?
 
         akaPrivateSale:
 

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZBuyAccount_Details.pas

@@ -70,6 +70,7 @@ uses
   UCrypto,
   UMemory,
   UAccounts,
+  UPCDataTypes,
   USettings,
   UCoreUtils,
   UBaseTypes,

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZChangeAccountInfo.pas

@@ -43,6 +43,7 @@ uses
   UWallet,
   UCommon,
   UAccounts,
+  UPCDataTypes,
   UCoreUtils,
   UWIZOperationSelected,
   UWIZChangeAccountInfo_Details,

+ 18 - 18
src/gui-experimental/wizards/operations/UWIZChangeAccountInfo_Details.lfm

@@ -8,7 +8,7 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
   Caption = 'WIZChangeAccountInfo_Details'
   ClientHeight = 379
   ClientWidth = 450
-  Visible = False
+  LCLVersion = '2.0.10.0'
   object gbName: TGroupBox
     Left = 8
     Height = 124
@@ -16,7 +16,7 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
     Width = 431
     Anchors = [akTop, akLeft, akRight]
     Caption = 'Name'
-    ClientHeight = 104
+    ClientHeight = 105
     ClientWidth = 427
     TabOrder = 0
     object txtName: TEdit
@@ -35,18 +35,18 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
     end
     object lblNameNotice: TLabel
       Left = 16
-      Height = 15
+      Height = 14
       Top = 8
-      Width = 121
+      Width = 130
       Caption = 'Please enter new name'
       ParentColor = False
       ParentFont = False
     end
     object lblNameDetails: TLabel
-      Left = 333
-      Height = 15
+      Left = 329
+      Height = 14
       Top = 8
-      Width = 74
+      Width = 78
       Anchors = [akTop, akRight]
       Caption = 'Name Details'
       Font.Style = [fsBold]
@@ -61,7 +61,7 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
     Width = 431
     Anchors = [akTop, akLeft, akRight]
     Caption = 'Type'
-    ClientHeight = 102
+    ClientHeight = 103
     ClientWidth = 427
     ParentFont = False
     TabOrder = 1
@@ -82,17 +82,17 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
     end
     object lblTypeNotice: TLabel
       Left = 16
-      Height = 15
+      Height = 14
       Top = 11
-      Width = 114
+      Width = 125
       Caption = 'Please enter new type'
       ParentColor = False
     end
     object lblTypeDetails: TLabel
-      Left = 340
-      Height = 15
+      Left = 333
+      Height = 14
       Top = 8
-      Width = 67
+      Width = 74
       Anchors = [akTop, akRight]
       Caption = 'Type Details'
       Font.Style = [fsBold]
@@ -107,22 +107,22 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
     Width = 431
     Anchors = [akTop, akLeft, akRight, akBottom]
     Caption = 'Options'
-    ClientHeight = 69
+    ClientHeight = 70
     ClientWidth = 427
     TabOrder = 2
     object chkCustomFee: TCheckBox
       Left = 16
-      Height = 19
+      Height = 18
       Top = 8
-      Width = 164
+      Width = 174
       Caption = 'Allow me to choose the fee'
       TabOrder = 0
     end
     object chkPayload: TCheckBox
       Left = 16
-      Height = 19
+      Height = 18
       Top = 40
-      Width = 158
+      Width = 163
       Caption = 'Attach a message payload'
       TabOrder = 1
     end

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZChangeAccountInfo_Details.pas

@@ -64,6 +64,7 @@ uses
   UCommon,
   UMemory,
   UAccounts,
+  UPCDataTypes,
   USettings,
   UCoreUtils,
   UBaseTypes,

+ 1 - 1
src/gui-experimental/wizards/operations/UWIZChangeKey.pas

@@ -15,7 +15,7 @@ unit UWIZChangeKey;
 interface
 
 uses
-  Classes, SysUtils, Forms, Dialogs, UCrypto, UCommon, UWizard, UAccounts, UCoreObjects, UWIZOperation, LCLType;
+  Classes, SysUtils, Forms, Dialogs, UCrypto, UCommon, UWizard, UAccounts, UPCDataTypes, UCoreObjects, UWIZOperation, LCLType;
 
 type
 

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZChangeKey_EnterKey.pas

@@ -49,6 +49,7 @@ implementation
 
 uses
   UAccounts,
+  UPCDataTypes,
   USettings,
   UCoreObjects,
   UWIZOperationFee_Custom,

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZChangeKey_SelectKey.pas

@@ -55,6 +55,7 @@ uses
   UCommon,
   UCrypto,
   UAccounts,
+  UPCDataTypes,
   USettings,
   UCoreObjects,
   UWIZOperationFee_Custom,

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale.pas

@@ -44,6 +44,7 @@ uses
   UCrypto,
   UWallet,
   UAccounts,
+  UPCDataTypes,
   UCoreUtils,
   UCoreObjects,
   UWIZOperationSelected,

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSeller.pas

@@ -54,6 +54,7 @@ uses
   UNode,
   UWallet,
   UAccounts,
+  UPCDataTypes,
   UCoreUtils,
   UBaseTypes,
   UFRMAccountSelect;

+ 1 - 1
src/gui-experimental/wizards/operations/UWIZOperation.pas

@@ -22,7 +22,7 @@ unit UWIZOperation;
 interface
 
 uses
-  Classes, SysUtils, UAccounts, UWallet, UBaseTypes, UCoreObjects;
+  Classes, SysUtils, UAccounts, UWallet, UBaseTypes, UCoreObjects, UPCDataTypes;
 
 type
 

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZOperationConfirmation.pas

@@ -57,6 +57,7 @@ uses
   UWallet,
   UCommon,
   UAccounts,
+  UPCDataTypes,
   UCoreUtils,
   UCoreObjects,
   UCommon.UI,

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZOperationFee_Custom.pas

@@ -57,6 +57,7 @@ implementation
 
 uses
   UAccounts,
+  UPCDataTypes,
   USettings,
   UCoreUtils,
   UCoreObjects,

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZOperationSelected.pas

@@ -56,6 +56,7 @@ uses
   UCoreObjects,
   UCommon.Data,
   UDataSources,
+  UPCDataTypes,
   Generics.Collections;
 
 type

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZOperationSigner_Select.pas

@@ -51,6 +51,7 @@ implementation
 
 uses
   UAccounts,
+  UPCDataTypes,
   UCoreObjects;
 
 { TWIZOperationSigner_Select }

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZSendPASC_Details.pas

@@ -68,6 +68,7 @@ uses
   USettings,
   UCoreUtils,
   UBaseTypes,
+  UPCDataTypes,
   UCoreObjects,
   UBlockChain,
   UFRMAccountSelect,

+ 2 - 1
src/gui-experimental/wizards/wallet/UWIZAddKey_ImportPubKey.pas

@@ -39,7 +39,8 @@ implementation
 {$R *.lfm}
 
 uses
-  UAccounts;
+  UAccounts,
+  UPCDataTypes;
 
 { TWIZAddKey_ImportPubKey }
 

+ 15 - 13
src/libraries/sphere10/UWizard.pas

@@ -31,7 +31,7 @@ const
 
 type
   { Forward Declarations }
-  TWizardForm<T> = class;
+//  TWizardForm<T> = class; // Skybuck: disabled, not needed anymore.
 
   { Enums }
 
@@ -101,7 +101,7 @@ type
         FHost : TWizardHostForm;
         FStarted : Boolean;
         FFinished : Boolean;
-        FCurrentScreen : TWizardForm<T>;
+        FCurrentScreen : __TScreenType; // Skybuck: Using __TScreenType instead of TWizard<T> solved the FPC Compiler bug !
         FModel : T;
         FScreenPath : TList<TComponentClass>;
         FScreenPathBackup : TDictionary<SizeInt, __TList_TComponentClass>;
@@ -117,16 +117,16 @@ type
         procedure NextHandler(sender : TObject);
         procedure PreviousHandler(sender : TObject);
     protected
-        function CreateScreen(AType: TComponentClass) : TWizardForm<T>;
+        function CreateScreen(AType: TComponentClass) : __TScreenType;
         function DetermineHasNext : boolean; virtual;
         function DetermineHasPrevious : boolean; virtual;
-        procedure PresentScreen(screen : TWizardForm<T>); virtual;
+        procedure PresentScreen(screen : __TScreenType); virtual;
         function FinishRequested(out message : AnsiString) : boolean; virtual; abstract;
         function CancelRequested(out message : AnsiString) : boolean; virtual; abstract;
     public
-        constructor Create(AOwner:TComponent; const screens: array of TComponentClass); overload;
+       constructor Create(AOwner:TComponent; const screens: array of TComponentClass); overload;
         destructor Destroy; override;
-        property CurrentScreen : TWizardForm<T> read FCurrentScreen;
+        property CurrentScreen : __TScreenType read FCurrentScreen;
         property Model : T read FModel;
         property HasNext : boolean read DetermineHasNext;
         property HasPrevious : boolean read DetermineHasPrevious;
@@ -153,7 +153,7 @@ type
       function CancelRequested(out message : AnsiString) : boolean; override;
       function FinishRequested(out message : AnsiString) : boolean; override;
     public
-      constructor Create(AOwner:TComponent; title, finish: AnsiString; const screens : array of TComponentClass; cancelFunc: TActionWizardCancelFunc; finishFunc : TActionWizardFinishFunc);
+      constructor Create(AOwner:TComponent; title, finish: AnsiString; const screens : array of TComponentClass; cancelFunc: TActionWizardCancelFunc; finishFunc : TActionWizardFinishFunc); // Skybuck: disabled for now because of fpc compiler internal error: 200602034
       class procedure Show(AParent: TForm; title, finish: AnsiString; constref bag : T; const screens : array of TComponentClass; cancelFunc: TActionWizardCancelFunc; finishFunc : TActionWizardFinishFunc);
       property FinishText : AnsiString read FTitleText;
       property TitleText : AnsiString read FFinishText;
@@ -304,7 +304,7 @@ end;
 constructor TWizard<T>.Create(AOwner:TComponent; const screens: array of TComponentClass);
 var
    i : integer;
-   screen : TWizardForm<T>;
+   screen : __TScreenType;
 begin
   inherited Create(AOwner);
   if Length(screens) = 0 then
@@ -328,7 +328,7 @@ end;
 destructor TWizard<T>.Destroy;
 var
   i : integer;
-  screen : TWizardForm<T>;
+  screen : __TScreenType;
   key : TComponentClass;
   backup : TList<TComponentClass>;
 begin
@@ -346,10 +346,10 @@ begin
   // note: Property bag not destroyed, left for user to destroy
 end;
 
-function TWizard<T>.CreateScreen(AType: TComponentClass) : TWizardForm<T>;
+function TWizard<T>.CreateScreen(AType: TComponentClass) : __TScreenType;
 begin
   if NOT FScreenInstances.ContainsKey(AType) then begin
-    Result := TWizardForm<T>(AType.Create(self));
+    Result := __TScreenType(AType.Create(self));
     if Result = nil then
       raise Exception.Create('Supplied type was not correct TWizardForm<T> type');
     Result.UpdatePath := UpdatePath;
@@ -361,7 +361,7 @@ end;
 function TWizard<T>.CalculateFitSize : TPoint;
 var
   maxWidth, maxHeight, i : Integer;
-  screen : TWizardForm<T>;
+  screen : __TScreenType;
 begin
   maxWidth := 0;
   maxHeight := 0;
@@ -489,7 +489,7 @@ begin
   end;
 end;
 
-procedure TWizard<T>.PresentScreen(screen : TWizardForm<T>);
+procedure TWizard<T>.PresentScreen(screen : __TScreenType);
 begin
   FCurrentScreen := screen;
   FCurrentScreen.Model := Model;
@@ -532,6 +532,7 @@ begin
   self.FFinishHandler := finishFunc;
 end;
 
+
 class procedure TActionWizard<T>.Show(AParent: TForm; title, finish: AnsiString; constref bag : T; const screens : array of TComponentClass; cancelFunc: TActionWizardCancelFunc; finishFunc : TActionWizardFinishFunc);
 type
   MyWizard = TActionWizard<T>;
@@ -563,4 +564,5 @@ end;
 
 {%endregion}
 
+
 end.

BIN
src/pascalcoin_wallet_classic.res