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

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

@@ -21,7 +21,7 @@ interface
 uses
 uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, Menus,
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, Menus,
   ExtCtrls, PairSplitter, Buttons, UVisualGrid, UCommon, UCommon.UI, Generics.Collections,
   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
 type
 
 

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

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

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

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

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

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

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

@@ -84,7 +84,7 @@ type
 
 
 implementation
 implementation
 
 
-uses UConst, USettings, UAccounts, ULog, UCrypto, UFolderHelper, UWallet, UUserInterface, UCommon;
+uses UConst, USettings, UAccounts, ULog, UCrypto, UFolderHelper, UWallet, UUserInterface, UCommon, UNode;
 
 
 {$R *.lfm}
 {$R *.lfm}
 
 
@@ -135,7 +135,13 @@ end;
 
 
 procedure TFRMPascalCoinWalletConfig.bbOpenDataFolderClick(Sender: TObject);
 procedure TFRMPascalCoinWalletConfig.bbOpenDataFolderClick(Sender: TObject);
 begin
 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;
 end;
 
 
 procedure TFRMPascalCoinWalletConfig.bbUpdatePasswordClick(Sender: TObject);
 procedure TFRMPascalCoinWalletConfig.bbUpdatePasswordClick(Sender: TObject);

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

@@ -342,8 +342,9 @@ begin
     FLog.SaveTypes := [];
     FLog.SaveTypes := [];
 
 
     // Create data directories
     // 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
     // Load settings
     TSettings.Load;
     TSettings.Load;
@@ -378,7 +379,8 @@ begin
 
 
     // Initialise Database
     // Initialise Database
     FNode.Bank.StorageClass := TFileStorage;
     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;
     TFileStorage(FNode.Bank.Storage).Initialize;
 
 
     // Reading database
     // Reading database
@@ -616,7 +618,8 @@ begin
       FLog.SaveTypes := CT_TLogTypes_ALL
       FLog.SaveTypes := CT_TLogTypes_ALL
     else
     else
       FLog.SaveTypes := CT_TLogTypes_DEFAULT;
       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
   end else begin
     FLog.SaveTypes := [];
     FLog.SaveTypes := [];
     FLog.FileName := '';
     FLog.FileName := '';
@@ -631,7 +634,8 @@ begin
     finally
     finally
       FNode.UnlockMempoolWrite;
       FNode.UnlockMempoolWrite;
     end;
     end;
-    FNode.NodeLogFilename := TFolderHelper.GetPascalCoinDataFolder+PathDelim+'blocks.log';
+    // Skybuck: Using solution 1 for now: TNode.GetPascalCoinDataFolder
+    FNode.NodeLogFilename := TNode.GetPascalCoinDataFolder+PathDelim+'blocks.log';
   end;
   end;
   if Assigned(FPoolMiningServer) then begin
   if Assigned(FPoolMiningServer) then begin
     if FPoolMiningServer.Port <> TSettings.MinerServerRpcPort 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;
   LCurrentAccount, LSignerAccount: TAccount;
   LOperationPayload : TOperationPayload;
   LOperationPayload : TOperationPayload;
   LANewAccountState : TAccountState;
   LANewAccountState : TAccountState;
+  LHashLock : T32Bytes;
 begin
 begin
 
 
   LWalletKeys := TWallet.Keys;
   LWalletKeys := TWallet.Keys;
@@ -1252,15 +1253,16 @@ begin
         Exit(False);
         Exit(False);
       end;
       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
       case AAccountSaleMode of
         akaPublicSale:
         akaPublicSale:
-
           LPCOperation := TOpListAccountForSaleOrSwap.CreateListAccountForSaleOrSwap(
           LPCOperation := TOpListAccountForSaleOrSwap.CreateListAccountForSaleOrSwap(
             LNode.Bank.Safebox.CurrentProtocol,
             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,
             LSignerAccount.account, LSignerAccount.n_operation + 1 + LAccountIdx,
             LCurrentAccount.account, ASalePrice, LFee, ASellerAccount.account,
             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:
         akaPrivateSale:
 
 

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

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

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

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

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

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

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

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

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

@@ -15,7 +15,7 @@ unit UWIZChangeKey;
 interface
 interface
 
 
 uses
 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
 type
 
 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

BIN
src/pascalcoin_wallet_classic.res