Browse Source

Merge branch 'master' of https://github.com/PascalCoin/PascalCoin

PascalCoin 6 years ago
parent
commit
962ac95b24
53 changed files with 182 additions and 176 deletions
  1. 1 1
      src/gui-experimental/UCTRLSyncronization.lfm
  2. 2 2
      src/gui-experimental/UCTRLSyncronization.pas
  3. 8 9
      src/gui-experimental/UFRMAccountExplorer.lfm
  4. 2 2
      src/gui-experimental/UFRMAccountExplorer.pas
  5. 0 1
      src/gui-experimental/UFRMAccountSelect.lfm
  6. 7 7
      src/gui-experimental/UFRMAccountSelect.pas
  7. 1 1
      src/gui-experimental/UFRMMessages.lfm
  8. 5 5
      src/gui-experimental/UFRMMessages.pas
  9. 0 1
      src/gui-experimental/UFRMOperation.lfm
  10. 20 20
      src/gui-experimental/UFRMOperation.pas
  11. 1 0
      src/gui-experimental/UFRMPascalCoinWalletConfig.lfm
  12. 8 7
      src/gui-experimental/UFRMPascalCoinWalletConfig.pas
  13. 1 1
      src/gui-experimental/UFRMPayloadDecoder.lfm
  14. 8 7
      src/gui-experimental/UFRMPayloadDecoder.pas
  15. 1 1
      src/gui-experimental/UFRMPendingOperations.lfm
  16. 2 2
      src/gui-experimental/UFRMPendingOperations.pas
  17. 2 1
      src/gui-experimental/UFRMRandomOperations.lfm
  18. 2 2
      src/gui-experimental/UFRMRandomOperations.pas
  19. 10 5
      src/gui-experimental/UUserInterface.pas
  20. 3 3
      src/gui-experimental/core.utils/UCoreObjects.pas
  21. 27 27
      src/gui-experimental/core.utils/UCoreUtils.pas
  22. 2 2
      src/gui-experimental/core.utils/UDataSources.pas
  23. 1 1
      src/gui-experimental/wizards/operations/UWIZChangeAccountInfo.pas
  24. 5 4
      src/gui-experimental/wizards/operations/UWIZChangeAccountInfo_Details.lfm
  25. 13 11
      src/gui-experimental/wizards/operations/UWIZChangeAccountInfo_Details.pas
  26. 1 0
      src/gui-experimental/wizards/operations/UWIZChangeKey_EnterKey.lfm
  27. 3 5
      src/gui-experimental/wizards/operations/UWIZChangeKey_EnterKey.pas
  28. 1 0
      src/gui-experimental/wizards/operations/UWIZChangeKey_SelectKey.lfm
  29. 3 5
      src/gui-experimental/wizards/operations/UWIZChangeKey_SelectKey.pas
  30. 1 0
      src/gui-experimental/wizards/operations/UWIZDelistAccountFromSale_Options.lfm
  31. 1 1
      src/gui-experimental/wizards/operations/UWIZDelistAccountFromSale_Options.pas
  32. 1 1
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterLockingBlock.lfm
  33. 1 2
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterLockingBlock.pas
  34. 1 0
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSaleAmount.lfm
  35. 3 5
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSaleAmount.pas
  36. 1 0
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSeller.lfm
  37. 5 7
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSeller.pas
  38. 2 1
      src/gui-experimental/wizards/operations/UWIZOperation.pas
  39. 2 2
      src/gui-experimental/wizards/operations/UWIZOperationConfirmation.pas
  40. 1 0
      src/gui-experimental/wizards/operations/UWIZOperationFee_Custom.lfm
  41. 4 4
      src/gui-experimental/wizards/operations/UWIZOperationFee_Custom.pas
  42. 1 0
      src/gui-experimental/wizards/operations/UWIZOperationPayload_Content.lfm
  43. 2 3
      src/gui-experimental/wizards/operations/UWIZOperationPayload_Content.pas
  44. 1 0
      src/gui-experimental/wizards/operations/UWIZOperationPayload_Encryption.lfm
  45. 1 2
      src/gui-experimental/wizards/operations/UWIZOperationPayload_Encryption.pas
  46. 1 1
      src/gui-experimental/wizards/operations/UWIZOperationPayload_Password.lfm
  47. 1 2
      src/gui-experimental/wizards/operations/UWIZOperationPayload_Password.pas
  48. 4 6
      src/gui-experimental/wizards/operations/UWIZOperationSelected.pas
  49. 1 0
      src/gui-experimental/wizards/operations/UWIZOperationSigner_Select.lfm
  50. 1 2
      src/gui-experimental/wizards/operations/UWIZOperationSigner_Select.pas
  51. 1 0
      src/gui-experimental/wizards/operations/UWIZSendPASC_Details.lfm
  52. 4 3
      src/gui-experimental/wizards/operations/UWIZSendPASC_Details.pas
  53. 1 1
      src/pascalcoin_wallet_experimental.lpi

+ 1 - 1
src/gui-experimental/UCTRLSyncronization.lfm

@@ -10,7 +10,7 @@ object CTRLSyncronization: TCTRLSyncronization
   ClientWidth = 728
   ClientWidth = 728
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   OnDestroy = FormDestroy
-  LCLVersion = '1.8.4.0'
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object paSplash: TPanel
   object paSplash: TPanel
     Left = 0
     Left = 0

+ 2 - 2
src/gui-experimental/UCTRLSyncronization.pas

@@ -78,7 +78,7 @@ type
     procedure OnAppStarted(Sender: TObject);
     procedure OnAppStarted(Sender: TObject);
     procedure OnBlocksChanged(Sender: TObject);
     procedure OnBlocksChanged(Sender: TObject);
     procedure OnUIRefreshTimer(Sender: TObject);
     procedure OnUIRefreshTimer(Sender: TObject);
-    procedure OnNodeMessageEvent(NetConnection: TNetConnection; MessageData: TRawBytes);
+    procedure OnNodeMessageEvent(NetConnection: TNetConnection; MessageData: String);
   protected
   protected
     procedure ActivateFirstTime; override;
     procedure ActivateFirstTime; override;
   public
   public
@@ -150,7 +150,7 @@ begin
   UpdateNodeStatus;
   UpdateNodeStatus;
 end;
 end;
 
 
-procedure TCTRLSyncronization.OnNodeMessageEvent(NetConnection: TNetConnection; MessageData: TRawBytes);
+procedure TCTRLSyncronization.OnNodeMessageEvent(NetConnection: TNetConnection; MessageData: String);
 begin
 begin
   inc(FMessagesUnreadCount);
   inc(FMessagesUnreadCount);
   if FMessagesUnreadCount>1 then
   if FMessagesUnreadCount>1 then

+ 8 - 9
src/gui-experimental/UFRMAccountExplorer.lfm

@@ -11,11 +11,10 @@ object FRMAccountExplorer: TFRMAccountExplorer
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
   Position = poOwnerFormCenter
-  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object Splitter1: TSplitter
   object Splitter1: TSplitter
     Left = 380
     Left = 380
-    Height = 365
+    Height = 385
     Top = 66
     Top = 66
     Width = 5
     Width = 5
   end
   end
@@ -141,17 +140,17 @@ object FRMAccountExplorer: TFRMAccountExplorer
   end
   end
   object pnlAccounts: TPanel
   object pnlAccounts: TPanel
     Left = 0
     Left = 0
-    Height = 365
+    Height = 385
     Top = 66
     Top = 66
     Width = 380
     Width = 380
     Align = alLeft
     Align = alLeft
     BevelOuter = bvNone
     BevelOuter = bvNone
-    ClientHeight = 365
+    ClientHeight = 385
     ClientWidth = 380
     ClientWidth = 380
     TabOrder = 1
     TabOrder = 1
     object dgAccounts: TDrawGrid
     object dgAccounts: TDrawGrid
       Left = 0
       Left = 0
-      Height = 331
+      Height = 351
       Top = 0
       Top = 0
       Width = 380
       Width = 380
       Align = alClient
       Align = alClient
@@ -165,7 +164,7 @@ object FRMAccountExplorer: TFRMAccountExplorer
     object pnlAccountsInfo: TPanel
     object pnlAccountsInfo: TPanel
       Left = 0
       Left = 0
       Height = 34
       Height = 34
-      Top = 331
+      Top = 351
       Width = 380
       Width = 380
       Align = alBottom
       Align = alBottom
       BevelOuter = bvNone
       BevelOuter = bvNone
@@ -246,7 +245,7 @@ object FRMAccountExplorer: TFRMAccountExplorer
   end
   end
   object pcAccountsOptions: TPageControl
   object pcAccountsOptions: TPageControl
     Left = 385
     Left = 385
-    Height = 365
+    Height = 385
     Top = 66
     Top = 66
     Width = 483
     Width = 483
     ActivePage = tsAccountOperations
     ActivePage = tsAccountOperations
@@ -255,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 = 337
+      ClientHeight = 357
       ClientWidth = 475
       ClientWidth = 475
       object dgAccountOperations: TDrawGrid
       object dgAccountOperations: TDrawGrid
         Left = 0
         Left = 0
-        Height = 337
+        Height = 357
         Top = 0
         Top = 0
         Width = 475
         Width = 475
         Align = alClient
         Align = alClient

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

@@ -211,7 +211,7 @@ implementation
 
 
 {$R *.lfm}
 {$R *.lfm}
 
 
-uses UFRMAccountSelect, UConst, USettings, UFRMOperation,
+uses UFRMAccountSelect, UConst, USettings,
      UWallet, UCrypto, UFRMMemoText, UUserInterface, UCommon, UPCOrderedLists;
      UWallet, UCrypto, UFRMMemoText, UUserInterface, UCommon, UPCOrderedLists;
 
 
 { TFRMAccountExplorer }
 { TFRMAccountExplorer }
@@ -739,7 +739,7 @@ end;
 
 
 procedure TFRMAccountExplorer.miDecodePayloadClick(Sender: TObject);
 procedure TFRMAccountExplorer.miDecodePayloadClick(Sender: TObject);
 begin
 begin
-  TUserInterface.ShowOperationInfoDialog(Self, FAccountOperationsGrid.SelectedOperation.OperationHash);
+  TUserInterface.ShowOperationInfoDialog(Self, TPCOperation.OperationHashAsHexa(FAccountOperationsGrid.SelectedOperation.OperationHash));
 end;
 end;
 
 
 procedure TFRMAccountExplorer.miRemoveAccountFromSelectedClick(Sender: TObject);
 procedure TFRMAccountExplorer.miRemoveAccountFromSelectedClick(Sender: TObject);

+ 0 - 1
src/gui-experimental/UFRMAccountSelect.lfm

@@ -15,7 +15,6 @@ object FRMAccountSelect: TFRMAccountSelect
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
   Position = poOwnerFormCenter
-  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object pnlAccountsTop: TPanel
   object pnlAccountsTop: TPanel
     Left = 395
     Left = 395

+ 7 - 7
src/gui-experimental/UFRMAccountSelect.pas

@@ -26,7 +26,7 @@ uses
   LCLIntf, LCLType, LMessages,
   LCLIntf, LCLType, LMessages,
   Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Dialogs, UAccounts, Grids, StdCtrls, Buttons, ExtCtrls, UCommon.UI,
   Dialogs, UAccounts, Grids, StdCtrls, Buttons, ExtCtrls, UCommon.UI,
-  UWallet, UNode, UGridUtils, UFRMMemoText, UConst, UThread, UPCOrderedLists;
+  UWallet, UNode, UGridUtils, UFRMMemoText, UConst, UThread, UPCOrderedLists, UBaseTypes;
 
 
 const
 const
   CT_AS_MyAccounts = $0001;
   CT_AS_MyAccounts = $0001;
@@ -42,7 +42,7 @@ type
     onlyForPublicSale,
     onlyForPublicSale,
     onlyForPrivateSaleToMe : Boolean;
     onlyForPrivateSaleToMe : Boolean;
     minBal,maxBal : Int64;
     minBal,maxBal : Int64;
-    searchName : AnsiString;
+    searchName : TRawBytes;
   end;
   end;
 
 
   TSearchProcedure = procedure(Const searchFound : TCardinalsArray; const searchValues : TSearchValues) of object;
   TSearchProcedure = procedure(Const searchFound : TCardinalsArray; const searchValues : TSearchValues) of object;
@@ -178,8 +178,8 @@ procedure TSearchThread.BCExecute;
       If IsValid then begin
       If IsValid then begin
         IsValid := (account.balance>=FSearchValues.minBal) And ((FSearchValues.maxBal<0) Or (account.balance<=FSearchValues.maxBal));
         IsValid := (account.balance>=FSearchValues.minBal) And ((FSearchValues.maxBal<0) Or (account.balance<=FSearchValues.maxBal));
       end;
       end;
-      If IsValid And (FSearchValues.searchName<>'') then begin
-        i := ansipos(FSearchValues.searchName,account.name);
+      If IsValid And (Length(FSearchValues.searchName)>0) then begin
+        i := TBaseType.FindIn(FSearchValues.searchName,account.name);
         IsValid := i>0;
         IsValid := i>0;
       end;
       end;
       //
       //
@@ -488,15 +488,15 @@ begin
     ebMaxBalance.Font.Color:=clGray;
     ebMaxBalance.Font.Color:=clGray;
   end;
   end;
   if (cbAccountsName.Checked) then begin
   if (cbAccountsName.Checked) then begin
-    searchValues.searchName := LowerCase(Trim(ebAccountName.Text));
+    searchValues.searchName.FromString(ebAccountName.Text);
     ebAccountName.ParentFont:=True;
     ebAccountName.ParentFont:=True;
   end else begin
   end else begin
-    searchValues.searchName:='';
+    searchValues.searchName:=Nil;
     ebAccountName.Font.Color := clGray;
     ebAccountName.Font.Color := clGray;
   end;
   end;
   If (searchValues.inAccountKey.EC_OpenSSL_NID=0) AND (searchValues.inWalletKeys=Nil) And (searchValues.maxBal<0) And (searchValues.minBal<=0) And
   If (searchValues.inAccountKey.EC_OpenSSL_NID=0) AND (searchValues.inWalletKeys=Nil) And (searchValues.maxBal<0) And (searchValues.minBal<=0) And
      (Not searchValues.onlyForPrivateSaleToMe) And (Not searchValues.onlyForPublicSale) And (Not searchValues.onlyForSale) And
      (Not searchValues.onlyForPrivateSaleToMe) And (Not searchValues.onlyForPublicSale) And (Not searchValues.onlyForSale) And
-     (searchValues.searchName='') then begin
+     (Length(searchValues.searchName)=0) then begin
     FAccountsGrid.ShowAllAccounts:=True;
     FAccountsGrid.ShowAllAccounts:=True;
     lblAccountsCount.Caption := IntToStr(FAccountsGrid.Node.Bank.SafeBox.AccountsCount);
     lblAccountsCount.Caption := IntToStr(FAccountsGrid.Node.Bank.SafeBox.AccountsCount);
     lblAccountsBalance.Caption := TAccountComp.FormatMoney(FAccountsGrid.AccountsBalance);
     lblAccountsBalance.Caption := TAccountComp.FormatMoney(FAccountsGrid.AccountsBalance);

+ 1 - 1
src/gui-experimental/UFRMMessages.lfm

@@ -11,7 +11,7 @@ object FRMMessages: TFRMMessages
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
   Position = poOwnerFormCenter
-  LCLVersion = '1.8.4.0'
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object Label11: TLabel
   object Label11: TLabel
     Left = 15
     Left = 15

+ 5 - 5
src/gui-experimental/UFRMMessages.pas

@@ -49,7 +49,7 @@ type
     FMessagesUnreadCount : Integer;
     FMessagesUnreadCount : Integer;
     { private declarations }
     { private declarations }
     procedure UpdateAvailableConnections;
     procedure UpdateAvailableConnections;
-    procedure OnNodeMessageEvent(NetConnection : TNetConnection; MessageData : TRawBytes);
+    procedure OnNodeMessageEvent(NetConnection : TNetConnection; MessageData : String);
   public
   public
     { public declarations }
     { public declarations }
   end;
   end;
@@ -77,7 +77,7 @@ begin
   TUserInterface.NodeMessageEvent.Remove(OnNodeMessageEvent);
   TUserInterface.NodeMessageEvent.Remove(OnNodeMessageEvent);
 end;
 end;
 
 
-procedure TFRMMessages.OnNodeMessageEvent(NetConnection: TNetConnection; MessageData: TRawBytes);
+procedure TFRMMessages.OnNodeMessageEvent(NetConnection: TNetConnection; MessageData: String);
 Var s : String;
 Var s : String;
 begin
 begin
   inc(FMessagesUnreadCount);
   inc(FMessagesUnreadCount);
@@ -88,11 +88,11 @@ begin
     if TSettings.ShowModalMessages then begin
     if TSettings.ShowModalMessages then begin
       s := DateTimeToStr(now)+' Message from '+NetConnection.ClientRemoteAddr+#10+
       s := DateTimeToStr(now)+' Message from '+NetConnection.ClientRemoteAddr+#10+
          'Length '+inttostr(length(MessageData))+' bytes'+#10+#10;
          'Length '+inttostr(length(MessageData))+' bytes'+#10+#10;
-      if TCrypto.IsHumanReadable(MessageData) then begin
+      if TCrypto.IsHumanReadable(TEncoding.ANSI.GetBytes(MessageData)) then begin
          s := s + MessageData;
          s := s + MessageData;
       end else begin
       end else begin
          s := s +'Value in hexadecimal:'+#10+
          s := s +'Value in hexadecimal:'+#10+
-              TCrypto.ToHexaString(MessageData);
+              TCrypto.ToHexaString(TEncoding.ANSI.GetBytes(MessageData));
       end;
       end;
       Application.MessageBox(PChar(s),PChar(Application.Title),MB_ICONINFORMATION+MB_OK);
       Application.MessageBox(PChar(s),PChar(Application.Title),MB_ICONINFORMATION+MB_OK);
     end;
     end;
@@ -148,7 +148,7 @@ begin
   basem := memoMessageToSend.Lines.Text;
   basem := memoMessageToSend.Lines.Text;
   m := '';
   m := '';
   // Clear non valid characters:
   // Clear non valid characters:
-  for i := 1 to length(basem) do begin
+   for i := Low(basem) to High(basem) do begin
     if basem[i] in [#32..#127] then m := m + basem[i]
     if basem[i] in [#32..#127] then m := m + basem[i]
     else m:=m+'.';
     else m:=m+'.';
   end;
   end;

+ 0 - 1
src/gui-experimental/UFRMOperation.lfm

@@ -16,7 +16,6 @@ object FRMOperation: TFRMOperation
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
   Position = poOwnerFormCenter
-  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object lblAccountCaption: TLabel
   object lblAccountCaption: TLabel
     Left = 25
     Left = 25

+ 20 - 20
src/gui-experimental/UFRMOperation.pas

@@ -158,7 +158,7 @@ type
     Function UpdateOpListForSale(Const TargetAccount : TAccount; var SalePrice : Int64; var SellerAccount,SignerAccount : TAccount; var NewOwnerPublicKey : TAccountKey; var LockedUntilBlock : Cardinal; var errors : AnsiString) : Boolean;
     Function UpdateOpListForSale(Const TargetAccount : TAccount; var SalePrice : Int64; var SellerAccount,SignerAccount : TAccount; var NewOwnerPublicKey : TAccountKey; var LockedUntilBlock : Cardinal; var errors : AnsiString) : Boolean;
     Function UpdateOpDelist(Const TargetAccount : TAccount; var SignerAccount : TAccount; var errors : AnsiString) : Boolean;
     Function UpdateOpDelist(Const TargetAccount : TAccount; var SignerAccount : TAccount; var errors : AnsiString) : Boolean;
     Function UpdateOpBuyAccount(Const SenderAccount : TAccount; var AccountToBuy : TAccount; var amount : Int64; var NewPublicKey : TAccountKey; var errors : AnsiString) : Boolean;
     Function UpdateOpBuyAccount(Const SenderAccount : TAccount; var AccountToBuy : TAccount; var amount : Int64; var NewPublicKey : TAccountKey; var errors : AnsiString) : Boolean;
-    Function UpdateOpChangeInfo(Const TargetAccount : TAccount; var SignerAccount : TAccount; var changeName : Boolean; var newName : AnsiString; var changeType : Boolean; var newType : Word; var errors : AnsiString) : Boolean;
+    Function UpdateOpChangeInfo(Const TargetAccount : TAccount; var SignerAccount : TAccount; var changeName : Boolean; var newName : TRawBytes; var changeType : Boolean; var newType : Word; var errors : AnsiString) : Boolean;
     procedure SetDefaultFee(const Value: Int64);
     procedure SetDefaultFee(const Value: Int64);
     Procedure OnSenderAccountsChanged(Sender : TObject);
     Procedure OnSenderAccountsChanged(Sender : TObject);
     procedure OnWalletKeysChanged(Sender : TObject);
     procedure OnWalletKeysChanged(Sender : TObject);
@@ -607,7 +607,7 @@ begin
   end;
   end;
   If SenderAccounts.Count>=1 then begin
   If SenderAccounts.Count>=1 then begin
     ebSignerAccount.text := TAccountComp.AccountNumberToAccountTxtNumber(SenderAccounts.Get(0));
     ebSignerAccount.text := TAccountComp.AccountNumberToAccountTxtNumber(SenderAccounts.Get(0));
-    ebChangeName.Text := FNode.Operations.SafeBoxTransaction.Account(SenderAccounts.Get(0)).name;
+    ebChangeName.Text := FNode.Operations.SafeBoxTransaction.Account(SenderAccounts.Get(0)).name.ToPrintable;
     ebChangeType.Text := IntToStr(FNode.Operations.SafeBoxTransaction.Account(SenderAccounts.Get(0)).account_type);
     ebChangeType.Text := IntToStr(FNode.Operations.SafeBoxTransaction.Account(SenderAccounts.Get(0)).account_type);
   end else begin
   end else begin
     ebSignerAccount.text := '';
     ebSignerAccount.text := '';
@@ -795,7 +795,7 @@ begin
 end;
 end;
 
 
 function TFRMOperation.UpdateOpChangeInfo(const TargetAccount: TAccount; var SignerAccount : TAccount;
 function TFRMOperation.UpdateOpChangeInfo(const TargetAccount: TAccount; var SignerAccount : TAccount;
-   var changeName : Boolean; var newName: AnsiString; var changeType : Boolean; var newType: Word; var errors: AnsiString): Boolean;
+   var changeName : Boolean; var newName: TRawBytes; var changeType : Boolean; var newType: Word; var errors: AnsiString): Boolean;
 var auxC : Cardinal;
 var auxC : Cardinal;
   i : Integer;
   i : Integer;
   errCode : Integer;
   errCode : Integer;
@@ -836,17 +836,17 @@ begin
       exit;
       exit;
     end;
     end;
     // New name and type
     // New name and type
-    newName := LowerCase( Trim(ebChangeName.Text) );
-    If newName<>TargetAccount.name then begin
+    newName.FromString(LowerCase( Trim(ebChangeName.Text) ));
+    If Not TBaseType.Equals(newName,TargetAccount.name) then begin
       changeName:=True;
       changeName:=True;
-      If newName<>'' then begin
+      If Length(newName)>0 then begin
         if (Not TPCSafeBox.ValidAccountName(newName,errors)) then begin
         if (Not TPCSafeBox.ValidAccountName(newName,errors)) then begin
-          errors := '"'+newName+'" is not a valid name: '+errors;
+          errors := '"'+newName.ToPrintable+'" is not a valid name: '+errors;
           Exit;
           Exit;
         end;
         end;
         i := (FNode.Bank.SafeBox.FindAccountByName(newName));
         i := (FNode.Bank.SafeBox.FindAccountByName(newName));
         if (i>=0) then begin
         if (i>=0) then begin
-          errors := 'Name "'+newName+'" is used by account '+TAccountComp.AccountNumberToAccountTxtNumber(i);
+          errors := 'Name "'+newName.ToPrintable+'" is used by account '+TAccountComp.AccountNumberToAccountTxtNumber(i);
           Exit;
           Exit;
         end;
         end;
       end;
       end;
@@ -998,7 +998,7 @@ Var
   salePrice, amount : Int64;
   salePrice, amount : Int64;
   auxC : Cardinal;
   auxC : Cardinal;
   changeName,changeType : Boolean;
   changeName,changeType : Boolean;
-  newName : AnsiString;
+  newName : TRawBytes;
   newType : Word;
   newType : Word;
 begin
 begin
   Result := false;
   Result := false;
@@ -1244,8 +1244,8 @@ Var payload_u : AnsiString;
   wk : TWalletKey;
   wk : TWalletKey;
 begin
 begin
   valid := false;
   valid := false;
-  payload_encrypted := '';
-  FEncodedPayload := '';
+  payload_encrypted := Nil;
+  FEncodedPayload := Nil;
   errors := 'Unknown error';
   errors := 'Unknown error';
   payload_u := memoPayload.Lines.Text;
   payload_u := memoPayload.Lines.Text;
   try
   try
@@ -1257,8 +1257,8 @@ begin
       // Use sender
       // Use sender
       errors := 'Error encrypting';
       errors := 'Error encrypting';
       account := FNode.Operations.SafeBoxTransaction.Account(SenderAccount.account);
       account := FNode.Operations.SafeBoxTransaction.Account(SenderAccount.account);
-      payload_encrypted := ECIESEncrypt(account.accountInfo.accountKey,payload_u);
-      valid := payload_encrypted<>'';
+      payload_encrypted := ECIESEncrypt(account.accountInfo.accountKey,TEncoding.ANSI.GetBytes(payload_u));
+      valid := Length(payload_encrypted)>0;
     end else if (rbEncryptedWithEC.Checked) then begin
     end else if (rbEncryptedWithEC.Checked) then begin
       errors := 'Error encrypting';
       errors := 'Error encrypting';
       if (PageControlOpType.ActivePage=tsTransaction) or (PageControlOpType.ActivePage=tsListForSale) or (PageControlOpType.ActivePage=tsDelist)
       if (PageControlOpType.ActivePage=tsTransaction) or (PageControlOpType.ActivePage=tsListForSale) or (PageControlOpType.ActivePage=tsDelist)
@@ -1293,8 +1293,8 @@ begin
           exit;
           exit;
         end;
         end;
         account := FNode.Operations.SafeBoxTransaction.Account(dest_account_number);
         account := FNode.Operations.SafeBoxTransaction.Account(dest_account_number);
-        payload_encrypted := ECIESEncrypt(account.accountInfo.accountKey,payload_u);
-        valid := payload_encrypted<>'';
+        payload_encrypted := ECIESEncrypt(account.accountInfo.accountKey,TEncoding.ANSI.GetBytes(payload_u));
+        valid := Length(payload_encrypted)>0;
       end else if (PageControlOpType.ActivePage=tsChangePrivateKey) then begin
       end else if (PageControlOpType.ActivePage=tsChangePrivateKey) then begin
         if (rbChangeKeyWithAnother.Checked) then begin
         if (rbChangeKeyWithAnother.Checked) then begin
           // With new key generated
           // With new key generated
@@ -1315,8 +1315,8 @@ begin
           exit;
           exit;
         end;
         end;
         if public_key.EC_OpenSSL_NID<>CT_Account_NUL.accountInfo.accountKey.EC_OpenSSL_NID then begin
         if public_key.EC_OpenSSL_NID<>CT_Account_NUL.accountInfo.accountKey.EC_OpenSSL_NID then begin
-          payload_encrypted := ECIESEncrypt(public_key,payload_u);
-          valid := payload_encrypted<>'';
+          payload_encrypted := ECIESEncrypt(public_key,TEncoding.ANSI.GetBytes(payload_u));
+          valid := Length(payload_encrypted)>0;
         end else begin
         end else begin
           valid := false;
           valid := false;
           errors := 'Selected private key is not valid to encode';
           errors := 'Selected private key is not valid to encode';
@@ -1326,10 +1326,10 @@ begin
         errors := 'This operation does not allow this kind of payload';
         errors := 'This operation does not allow this kind of payload';
       end;
       end;
     end else if (rbEncrptedWithPassword.Checked) then begin
     end else if (rbEncrptedWithPassword.Checked) then begin
-      payload_encrypted := TAESComp.EVP_Encrypt_AES256(payload_u,ebEncryptPassword.Text);
-      valid := payload_encrypted<>'';
+      payload_encrypted := TAESComp.EVP_Encrypt_AES256(TEncoding.ANSI.GetBytes(payload_u),TEncoding.ANSI.GetBytes(ebEncryptPassword.Text));
+      valid := Length(payload_encrypted)>0;
     end else if (rbNotEncrypted.Checked) then begin
     end else if (rbNotEncrypted.Checked) then begin
-      payload_encrypted := payload_u;
+      payload_encrypted := TEncoding.ANSI.GetBytes(payload_u);
       valid := true;
       valid := true;
     end else begin
     end else begin
       errors := 'Must select an encryption option for payload';
       errors := 'Must select an encryption option for payload';

+ 1 - 0
src/gui-experimental/UFRMPascalCoinWalletConfig.lfm

@@ -16,6 +16,7 @@ object FRMPascalCoinWalletConfig: TFRMPascalCoinWalletConfig
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
   Position = poOwnerFormCenter
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object Label1: TLabel
   object Label1: TLabel
     Left = 24
     Left = 24

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

@@ -222,8 +222,9 @@ end;
 
 
 procedure TFRMPascalCoinWalletConfig.RefreshUI_WalletAspect;
 procedure TFRMPascalCoinWalletConfig.RefreshUI_WalletAspect;
 Var i, iselected : Integer;
 Var i, iselected : Integer;
-  s : String;
+  auxs : String;
   wk : TWalletKey;
   wk : TWalletKey;
+  raw: TBytes;
 begin
 begin
   if TWallet.Keys.HasPassword then
   if TWallet.Keys.HasPassword then
     bbUpdatePassword.Caption := 'Change Wallet password'
     bbUpdatePassword.Caption := 'Change Wallet password'
@@ -233,17 +234,17 @@ begin
   for i := 0 to TWallet.Keys.Count - 1 do begin
   for i := 0 to TWallet.Keys.Count - 1 do begin
     wk := TWallet.Keys.Key[i];
     wk := TWallet.Keys.Key[i];
     if (wk.Name='') then begin
     if (wk.Name='') then begin
-      s := TCrypto.ToHexaString( TAccountComp.AccountKey2RawString(wk.AccountKey));
+      auxs := TCrypto.ToHexaString( TAccountComp.AccountKey2RawString(wk.AccountKey));
     end else begin
     end else begin
-      s := wk.Name;
+      auxs := wk.Name;
     end;
     end;
-    if wk.CryptedKey<>'' then begin
-      cbPrivateKeyToMine.Items.AddObject(s,TObject(i));
+    if (Length(wk.CryptedKey)>0) then begin
+      cbPrivateKeyToMine.Items.AddObject(auxs,TObject(i));
     end;
     end;
   end;
   end;
   cbPrivateKeyToMine.Sorted := true;
   cbPrivateKeyToMine.Sorted := true;
-  s := TSettings.MinerSelectedPrivateKey;
-  iselected := TWallet.Keys.IndexOfAccountKey(TAccountComp.RawString2Accountkey(s));
+  raw := TSettings.MinerSelectedPrivateKey;
+  iselected := TWallet.Keys.IndexOfAccountKey(TAccountComp.RawString2Accountkey(raw));
   if iselected >= 0 then begin
   if iselected >= 0 then begin
     iselected :=  cbPrivateKeyToMine.Items.IndexOfObject(TObject(iselected));
     iselected :=  cbPrivateKeyToMine.Items.IndexOfObject(TObject(iselected));
     cbPrivateKeyToMine.ItemIndex := iselected;
     cbPrivateKeyToMine.ItemIndex := iselected;

+ 1 - 1
src/gui-experimental/UFRMPayloadDecoder.lfm

@@ -15,7 +15,7 @@ object FRMPayloadDecoder: TFRMPayloadDecoder
   Font.Name = 'Tahoma'
   Font.Name = 'Tahoma'
   OnCreate = FormCreate
   OnCreate = FormCreate
   Position = poOwnerFormCenter
   Position = poOwnerFormCenter
-  LCLVersion = '1.8.4.0'
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object Label1: TLabel
   object Label1: TLabel
     Left = 20
     Left = 20

+ 8 - 7
src/gui-experimental/UFRMPayloadDecoder.pas

@@ -343,7 +343,7 @@ begin
 end;
 end;
 
 
 procedure TFRMPayloadDecoder.TryToDecode;
 procedure TFRMPayloadDecoder.TryToDecode;
-  Function UseWallet(Const raw : TRawBytes; var Decrypted : AnsiString; var WalletKey : TWalletKey) : Boolean;
+  Function UseWallet(Const raw : TRawBytes; var Decrypted : TRawBytes; var WalletKey : TWalletKey) : Boolean;
   Var i : Integer;
   Var i : Integer;
   begin
   begin
     Result := false;
     Result := false;
@@ -359,7 +359,7 @@ procedure TFRMPayloadDecoder.TryToDecode;
 
 
   end;
   end;
 
 
-  Function  UsePassword(const raw : TRawBytes; var Decrypted,PasswordUsed : AnsiString) : Boolean;
+  Function  UsePassword(const raw : TRawBytes; var Decrypted: TRawBytes; var PasswordUsed : AnsiString) : Boolean;
   Var i : Integer;
   Var i : Integer;
   Begin
   Begin
     Result := false;
     Result := false;
@@ -377,24 +377,25 @@ procedure TFRMPayloadDecoder.TryToDecode;
 
 
 Var raw : TRawBytes;
 Var raw : TRawBytes;
   WalletKey : TWalletKey;
   WalletKey : TWalletKey;
-  Decrypted,PasswordUsed : AnsiString;
+  Decrypted: TRawBytes;
+  PasswordUsed : AnsiString;
   ok : boolean;
   ok : boolean;
 begin
 begin
   ok := true;
   ok := true;
   raw := FOpResume.OriginalPayload;
   raw := FOpResume.OriginalPayload;
-  if raw<>'' then begin
+  if Length(raw)>0 then begin
     // First try to a human readable...
     // First try to a human readable...
     if (cbMethodPublicPayload.Checked) and (TCrypto.IsHumanReadable(raw)) then begin
     if (cbMethodPublicPayload.Checked) and (TCrypto.IsHumanReadable(raw)) then begin
       if cbShowAsHexadecimal.Checked then memoDecoded.Lines.Text := TCrypto.ToHexaString(raw)
       if cbShowAsHexadecimal.Checked then memoDecoded.Lines.Text := TCrypto.ToHexaString(raw)
-      else memoDecoded.Lines.Text := raw;
+      else memoDecoded.Lines.Text := TEncoding.ANSI.GetString(raw);
       lblDecodedMethod.Caption := 'Not encrypted payload';
       lblDecodedMethod.Caption := 'Not encrypted payload';
     end else if (cbUsingPrivateKeys.Checked) And (UseWallet(raw,Decrypted,WalletKey)) then begin
     end else if (cbUsingPrivateKeys.Checked) And (UseWallet(raw,Decrypted,WalletKey)) then begin
       if cbShowAsHexadecimal.Checked then memoDecoded.Lines.Text := TCrypto.ToHexaString(Decrypted)
       if cbShowAsHexadecimal.Checked then memoDecoded.Lines.Text := TCrypto.ToHexaString(Decrypted)
-      else memoDecoded.Lines.Text := Decrypted;
+      else memoDecoded.Lines.Text := TEncoding.ANSI.GetString(Decrypted);
       lblDecodedMethod.Caption := 'Encrypted with EC '+TAccountComp.GetECInfoTxt(WalletKey.PrivateKey.EC_OpenSSL_NID);
       lblDecodedMethod.Caption := 'Encrypted with EC '+TAccountComp.GetECInfoTxt(WalletKey.PrivateKey.EC_OpenSSL_NID);
     end else if (cbUsingPasswords.Checked) And (UsePassword(raw,Decrypted,PasswordUsed)) then begin
     end else if (cbUsingPasswords.Checked) And (UsePassword(raw,Decrypted,PasswordUsed)) then begin
       if cbShowAsHexadecimal.Checked then memoDecoded.Lines.Text := TCrypto.ToHexaString(Decrypted)
       if cbShowAsHexadecimal.Checked then memoDecoded.Lines.Text := TCrypto.ToHexaString(Decrypted)
-      else memoDecoded.Lines.Text := Decrypted;
+      else memoDecoded.Lines.Text := TEncoding.ANSI.GetString(Decrypted);
       lblDecodedMethod.Caption := 'Encrypted with pwd:"'+PasswordUsed+'"';
       lblDecodedMethod.Caption := 'Encrypted with pwd:"'+PasswordUsed+'"';
     end else begin
     end else begin
       memoDecoded.Lines.Text := 'CANNOT DECRYPT';
       memoDecoded.Lines.Text := 'CANNOT DECRYPT';

+ 1 - 1
src/gui-experimental/UFRMPendingOperations.lfm

@@ -11,7 +11,7 @@ object FRMPendingOperations: TFRMPendingOperations
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
   Position = poOwnerFormCenter
-  LCLVersion = '1.8.4.0'
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object pnlPendingOperations: TPanel
   object pnlPendingOperations: TPanel
     Left = 0
     Left = 0

+ 2 - 2
src/gui-experimental/UFRMPendingOperations.pas

@@ -55,7 +55,7 @@ var
 
 
 implementation
 implementation
 
 
-uses UUserInterface;
+uses UUserInterface, UBlockChain;
 
 
 {$R *.lfm}
 {$R *.lfm}
 
 
@@ -92,7 +92,7 @@ end;
 
 
 procedure TFRMPendingOperations.dgPendingOperationsDblClick(Sender: TObject);
 procedure TFRMPendingOperations.dgPendingOperationsDblClick(Sender: TObject);
 begin
 begin
-  TUserInterface.ShowOperationInfoDialog(Self, FPendingOperationsGrid.SelectedOperation.OperationHash);
+  TUserInterface.ShowOperationInfoDialog(Self, TPCOperation.OperationHashAsHexa(FPendingOperationsGrid.SelectedOperation.OperationHash));
 end;
 end;
 
 
 end.
 end.

+ 2 - 1
src/gui-experimental/UFRMRandomOperations.lfm

@@ -11,7 +11,8 @@ object FRMRandomOperations: TFRMRandomOperations
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
   Position = poOwnerFormCenter
-  LCLVersion = '1.8.0.6'
+  LCLVersion = '1.8.2.0'
+  Visible = False
   object pnlTop: TPanel
   object pnlTop: TPanel
     Left = 0
     Left = 0
     Height = 66
     Height = 66

+ 2 - 2
src/gui-experimental/UFRMRandomOperations.pas

@@ -305,7 +305,7 @@ begin
     if (Random(500)<1) then fees := 0
     if (Random(500)<1) then fees := 0
     else fees := 1; // Minimal fee
     else fees := 1; // Minimal fee
     if (senderAcc.balance>2) then begin
     if (senderAcc.balance>2) then begin
-      opTx := TOpTransaction.CreateTransaction(current_protocol,senderAcc.account,senderAcc.n_operation+1,nAccountTarget,aWalletKeys.Key[iKey].PrivateKey,amount,fees,'');
+      opTx := TOpTransaction.CreateTransaction(current_protocol,senderAcc.account,senderAcc.n_operation+1,nAccountTarget,aWalletKeys.Key[iKey].PrivateKey,amount,fees,Nil);
       Try
       Try
         if operationsComp.AddOperation(True,opTx,errors) then inc(Result);
         if operationsComp.AddOperation(True,opTx,errors) then inc(Result);
       finally
       finally
@@ -394,7 +394,7 @@ begin
               end;
               end;
               1 : begin
               1 : begin
                 changer.Changes_type:=[account_name];
                 changer.Changes_type:=[account_name];
-                changer.New_Name:='random'+IntToStr(Random(100)); // <- This will generate collisions
+                changer.New_Name:=TEncoding.ANSI.GetBytes('random'+IntToStr(Random(100))); // <- This will generate collisions
               end;
               end;
             else
             else
               changer.Changes_type:=[account_type];
               changer.Changes_type:=[account_type];

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

@@ -112,7 +112,7 @@ type
       class procedure NotifyAccountsChangedEvent(Sender: TObject);
       class procedure NotifyAccountsChangedEvent(Sender: TObject);
       class procedure NotifyBlocksChangedEvent(Sender: TObject);
       class procedure NotifyBlocksChangedEvent(Sender: TObject);
       class procedure NotifyReceivedHelloMessageEvent(Sender: TObject);
       class procedure NotifyReceivedHelloMessageEvent(Sender: TObject);
-      class procedure NotifyNodeMessageEventEvent(NetConnection: TNetConnection; MessageData: TRawBytes);
+      class procedure NotifyNodeMessageEventEvent(NetConnection: TNetConnection; MessageData: String);
       class procedure NotifyNetStatisticsChangedEvent(Sender: TObject);
       class procedure NotifyNetStatisticsChangedEvent(Sender: TObject);
       class procedure NotifyNetConnectionsUpdatedEvent(Sender: TObject);
       class procedure NotifyNetConnectionsUpdatedEvent(Sender: TObject);
       class procedure NotifyNetNodeServersUpdatedEvent(Sender: TObject);
       class procedure NotifyNetNodeServersUpdatedEvent(Sender: TObject);
@@ -488,7 +488,7 @@ begin
   FPoolMiningServer := TPoolMiningServer.Create;
   FPoolMiningServer := TPoolMiningServer.Create;
   FPoolMiningServer.Port := TSettings.MinerServerRpcPort;
   FPoolMiningServer.Port := TSettings.MinerServerRpcPort;
   FPoolMiningServer.MinerAccountKey := TWallet.MiningKey;
   FPoolMiningServer.MinerAccountKey := TWallet.MiningKey;
-  FPoolMiningServer.MinerPayload := TSettings.MinerName;
+  FPoolMiningServer.MinerPayload := TEncoding.ANSI.GetBytes(TSettings.MinerName);
   FNode.Operations.AccountKey := TWallet.MiningKey;
   FNode.Operations.AccountKey := TWallet.MiningKey;
   FPoolMiningServer.Active := TSettings.MinerServerRpcActive;
   FPoolMiningServer.Active := TSettings.MinerServerRpcActive;
   FPoolMiningServer.OnMiningServerNewBlockFound := NotifyMiningServerNewBlockFoundEvent;
   FPoolMiningServer.OnMiningServerNewBlockFound := NotifyMiningServerNewBlockFoundEvent;
@@ -547,7 +547,7 @@ begin
     wa := FNode.NetServer.Active;
     wa := FNode.NetServer.Active;
     FNode.NetServer.Port := TSettings.InternetServerPort;
     FNode.NetServer.Port := TSettings.InternetServerPort;
     FNode.NetServer.Active := wa;
     FNode.NetServer.Active := wa;
-    FNode.Operations.BlockPayload := TSettings.MinerName;
+    FNode.Operations.BlockPayload := TEncoding.ANSI.GetBytes(TSettings.MinerName);
     FNode.NodeLogFilename := TFolderHelper.GetPascalCoinDataFolder+PathDelim+'blocks.log';
     FNode.NodeLogFilename := TFolderHelper.GetPascalCoinDataFolder+PathDelim+'blocks.log';
   end;
   end;
   if Assigned(FPoolMiningServer) then begin
   if Assigned(FPoolMiningServer) then begin
@@ -556,7 +556,7 @@ begin
       FPoolMiningServer.Port := TSettings.MinerServerRpcPort;
       FPoolMiningServer.Port := TSettings.MinerServerRpcPort;
     end;
     end;
     FPoolMiningServer.Active :=TSettings.MinerServerRpcActive;
     FPoolMiningServer.Active :=TSettings.MinerServerRpcActive;
-    FPoolMiningServer.UpdateAccountAndPayload(TWallet.MiningKey, TSettings.MinerName);
+    FPoolMiningServer.UpdateAccountAndPayload(TWallet.MiningKey, TEncoding.ANSI.GetBytes(TSettings.MinerName));
   end;
   end;
   if Assigned(FRPCServer) then begin
   if Assigned(FRPCServer) then begin
     FRPCServer.Active := TSettings.RpcPortEnabled;
     FRPCServer.Active := TSettings.RpcPortEnabled;
@@ -601,6 +601,7 @@ begin
   wiz := Scoped.AddObject(TWIZSendPASCWizard.Create(nil)) as TWIZSendPASCWizard;
   wiz := Scoped.AddObject(TWIZSendPASCWizard.Create(nil)) as TWIZSendPASCWizard;
   model := TWIZOperationsModel.Create(wiz, omtSendPasc);
   model := TWIZOperationsModel.Create(wiz, omtSendPasc);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
+  model.Account.Count := Length(model.Account.SelectedAccounts);
   wiz.Start(model);
   wiz.Start(model);
 end;
 end;
 
 
@@ -613,6 +614,7 @@ begin
   wiz := Scoped.AddObject(TWIZChangeKeyWizard.Create(nil)) as TWIZChangeKeyWizard;
   wiz := Scoped.AddObject(TWIZChangeKeyWizard.Create(nil)) as TWIZChangeKeyWizard;
   model := TWIZOperationsModel.Create(wiz, omtChangeKey);
   model := TWIZOperationsModel.Create(wiz, omtChangeKey);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
+  model.Account.Count := Length(model.Account.SelectedAccounts);
   wiz.Start(model);
   wiz.Start(model);
 end;
 end;
 
 
@@ -625,6 +627,7 @@ begin
   wiz := Scoped.AddObject(TWIZEnlistAccountForSaleWizard.Create(nil)) as TWIZEnlistAccountForSaleWizard;
   wiz := Scoped.AddObject(TWIZEnlistAccountForSaleWizard.Create(nil)) as TWIZEnlistAccountForSaleWizard;
   model := TWIZOperationsModel.Create(wiz, omtEnlistAccountForSale);
   model := TWIZOperationsModel.Create(wiz, omtEnlistAccountForSale);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
+  model.Account.Count := Length(model.Account.SelectedAccounts);
   wiz.Start(model);
   wiz.Start(model);
 end;
 end;
 
 
@@ -637,6 +640,7 @@ begin
   wiz := Scoped.AddObject(TWIZDelistAccountFromSaleWizard.Create(nil)) as TWIZDelistAccountFromSaleWizard;
   wiz := Scoped.AddObject(TWIZDelistAccountFromSaleWizard.Create(nil)) as TWIZDelistAccountFromSaleWizard;
   model := TWIZOperationsModel.Create(wiz, omtDelistAccountFromSale);
   model := TWIZOperationsModel.Create(wiz, omtDelistAccountFromSale);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
+  model.Account.Count := Length(model.Account.SelectedAccounts);
   wiz.Start(model);
   wiz.Start(model);
 end;
 end;
 
 
@@ -650,6 +654,7 @@ begin
   wiz := Scoped.AddObject(TWIZChangeAccountInfoWizard.Create(nil)) as TWIZChangeAccountInfoWizard;
   wiz := Scoped.AddObject(TWIZChangeAccountInfoWizard.Create(nil)) as TWIZChangeAccountInfoWizard;
   model := TWIZOperationsModel.Create(wiz, omtChangeInfo);
   model := TWIZOperationsModel.Create(wiz, omtChangeInfo);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
   model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
+  model.Account.Count := Length(model.Account.SelectedAccounts);
   wiz.Start(model);
   wiz.Start(model);
 end;
 end;
 
 
@@ -1149,7 +1154,7 @@ begin
   TUserInterface.FBlocksChanged.Invoke(Sender);
   TUserInterface.FBlocksChanged.Invoke(Sender);
 end;
 end;
 
 
-class procedure TUserInterface.NotifyNodeMessageEventEvent(NetConnection: TNetConnection; MessageData: TRawBytes);
+class procedure TUserInterface.NotifyNodeMessageEventEvent(NetConnection: TNetConnection; MessageData: String);
 begin
 begin
   TUserInterface.FNodeMessageEvent.Invoke(NetConnection, MessageData);
   TUserInterface.FNodeMessageEvent.Invoke(NetConnection, MessageData);
 end;
 end;

+ 3 - 3
src/gui-experimental/core.utils/UCoreObjects.pas

@@ -99,9 +99,9 @@ const
     Target: 0;
     Target: 0;
     HashRateTargetKhs: 0;
     HashRateTargetKhs: 0;
     HashRateKhs: 0;
     HashRateKhs: 0;
-    MinerPayload: '';
-    PoW: '';
-    SafeBoxHash: '';
+    MinerPayload: Nil;
+    PoW: Nil;
+    SafeBoxHash: Nil;
     AccumulatedWork: 0;
     AccumulatedWork: 0;
     TimeAverage200: 0;
     TimeAverage200: 0;
     TimeAverage150: 0;
     TimeAverage150: 0;

+ 27 - 27
src/gui-experimental/core.utils/UCoreUtils.pas

@@ -122,7 +122,7 @@ type
     class function ExecuteChangeKey(const ASelectedAccounts: TArray<TAccount>; const ASignerAccount: TAccount; APublicKey: TAccountKey; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; var AErrorMessage: string): boolean; static;
     class function ExecuteChangeKey(const ASelectedAccounts: TArray<TAccount>; const ASignerAccount: TAccount; APublicKey: TAccountKey; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; var AErrorMessage: string): boolean; static;
     class function ExecuteEnlistAccountForSale(const ASelectedAccounts: TArray<TAccount>; const ASignerAccount, ASellerAccount: TAccount; const APublicKey: TAccountKey; AFee, ASalePrice: int64; ALockedUntilBlock: UInt32; const AAccountSaleMode: TAccountSaleMode; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; var AErrorMessage: string): boolean; static;
     class function ExecuteEnlistAccountForSale(const ASelectedAccounts: TArray<TAccount>; const ASignerAccount, ASellerAccount: TAccount; const APublicKey: TAccountKey; AFee, ASalePrice: int64; ALockedUntilBlock: UInt32; const AAccountSaleMode: TAccountSaleMode; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; var AErrorMessage: string): boolean; static;
     class function ExecuteDelistAccountFromSale(const ASelectedAccounts: TArray<TAccount>; const ASignerAccount: TAccount; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; var AErrorMessage: string): boolean; static;
     class function ExecuteDelistAccountFromSale(const ASelectedAccounts: TArray<TAccount>; const ASignerAccount: TAccount; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; var AErrorMessage: string): boolean; static;
-    class function ExecuteChangeAccountInfo(const ASelectedAccounts, ASignerAccounts: TArray<TAccount>; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; const ANewName: string; const ANewType: word; var AErrorMessage: string): boolean; static;
+    class function ExecuteChangeAccountInfo(const ASelectedAccounts, ASignerAccounts: TArray<TAccount>; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; const ANewName: TRawBytes; const ANewType: word; var AErrorMessage: string): boolean; static;
   end;
   end;
 
 
 
 
@@ -546,9 +546,9 @@ end;
 
 
 class function TAccountKeyComparer.DoCompare(constref ALeft, ARight: TAccountKey): integer;
 class function TAccountKeyComparer.DoCompare(constref ALeft, ARight: TAccountKey): integer;
 begin
 begin
-  Result := BinStrComp(ALeft.x, ARight.x);
+  Result := BytesCompare(ALeft.x, ARight.x);
   if Result = 0 then
   if Result = 0 then
-    Result := BinStrComp(ALeft.y, ARight.y);
+    Result := BytesCompare(ALeft.y, ARight.y);
 end;
 end;
 
 
 { TAccountKeyEqualityComparer }
 { TAccountKeyEqualityComparer }
@@ -570,7 +570,7 @@ end;
 
 
 class function TAccountKeyEqualityComparer.CalcHashCode(constref AValue: TAccountKey): UInt32;
 class function TAccountKeyEqualityComparer.CalcHashCode(constref AValue: TAccountKey): UInt32;
 begin
 begin
-  Result := TEqualityComparer<ansistring>.Default.GetHashCode(IntToStr(AValue.EC_OpenSSL_NID) + AValue.x + AValue.y);
+  Result := TEqualityComparer<ansistring>.Default.GetHashCode(IntToStr(AValue.EC_OpenSSL_NID) + AValue.x.ToString + AValue.y.ToString);
 end;
 end;
 
 
 { TAccountHelper }
 { TAccountHelper }
@@ -583,8 +583,8 @@ end;
 function TAccountHelper.GetDisplayString: ansistring;
 function TAccountHelper.GetDisplayString: ansistring;
 begin
 begin
   Result := GetAccountString;
   Result := GetAccountString;
-  if Self.Name <> '' then
-    Result := Result + ': ' + Self.Name;
+  if Self.Name <> Nil then
+    Result := Result + ': ' + Self.Name.ToString;
 end;
 end;
 
 
 function TAccountHelper.GetInfoText(const ABank: TPCBank): utf8string;
 function TAccountHelper.GetInfoText(const ABank: TPCBank): utf8string;
@@ -593,7 +593,7 @@ var
   GC: TDisposables;
   GC: TDisposables;
 begin
 begin
   builder := GC.AddObject(TStringList.Create) as TStrings;
   builder := GC.AddObject(TStringList.Create) as TStrings;
-  builder.Append(Format('Account: %s %s Type:%d', [TAccountComp.AccountNumberToAccountTxtNumber(self.account), IIF(Self.Name <> '', 'Name: ' + Self.Name, ''), Self.account_type]));
+  builder.Append(Format('Account: %s %s Type:%d', [TAccountComp.AccountNumberToAccountTxtNumber(self.account), IIF(Self.Name <> Nil, 'Name: ' + Self.Name.ToString, ''), Self.account_type]));
   builder.Append('');
   builder.Append('');
   builder.Append(Format('Current balance: %s', [TAccountComp.FormatMoney(Self.balance)]));
   builder.Append(Format('Current balance: %s', [TAccountComp.FormatMoney(Self.balance)]));
   builder.Append('');
   builder.Append('');
@@ -650,9 +650,9 @@ begin
   builder.Add(Format('%s', [Self.OperationTxt]));
   builder.Add(Format('%s', [Self.OperationTxt]));
   builder.Add(Format('OpType:%d Subtype:%d', [Self.OpType, Self.OpSubtype]));
   builder.Add(Format('OpType:%d Subtype:%d', [Self.OpType, Self.OpSubtype]));
   builder.Add(Format('Operation Hash (ophash): %s', [TCrypto.ToHexaString(Self.OperationHash)]));
   builder.Add(Format('Operation Hash (ophash): %s', [TCrypto.ToHexaString(Self.OperationHash)]));
-  if (Self.OperationHash_OLD <> '') then
+  if (Self.OperationHash_OLD <> Nil) then
     builder.Add(Format('Old Operation Hash (old_ophash): %s', [TCrypto.ToHexaString(Self.OperationHash_OLD)]));
     builder.Add(Format('Old Operation Hash (old_ophash): %s', [TCrypto.ToHexaString(Self.OperationHash_OLD)]));
-  if (Self.OriginalPayload <> '') then
+  if (Self.OriginalPayload <> Nil) then
   begin
   begin
     builder.Add(Format('Payload length:%d', [length(Self.OriginalPayload)]));
     builder.Add(Format('Payload length:%d', [length(Self.OriginalPayload)]));
     if Self.PrintablePayload <> '' then
     if Self.PrintablePayload <> '' then
@@ -789,15 +789,15 @@ begin
       pemEncryptWithSender:
       pemEncryptWithSender:
       begin
       begin
         // Use sender public key
         // Use sender public key
-        AEncodedPayloadBytes := ECIESEncrypt(ASenderPublicKey, APayloadContent);
-        LValid := AEncodedPayloadBytes <> '';
+        AEncodedPayloadBytes := ECIESEncrypt(ASenderPublicKey, TEncoding.ANSI.GetBytes(APayloadContent));
+        LValid := AEncodedPayloadBytes <> Nil;
       end;
       end;
 
 
       pemEncryptWithRecipient:
       pemEncryptWithRecipient:
       begin
       begin
         // With destination public key
         // With destination public key
-        AEncodedPayloadBytes := ECIESEncrypt(ADestinationPublicKey, APayloadContent);
-        LValid := AEncodedPayloadBytes <> '';
+        AEncodedPayloadBytes := ECIESEncrypt(ADestinationPublicKey, TEncoding.ANSI.GetBytes(APayloadContent));
+        LValid := AEncodedPayloadBytes <> Nil;
       end;
       end;
 
 
       pemEncryptWithPassword:
       pemEncryptWithPassword:
@@ -809,14 +809,14 @@ begin
           Exit(False);
           Exit(False);
         end;
         end;
         AEncodedPayloadBytes := TAESComp.EVP_Encrypt_AES256(
         AEncodedPayloadBytes := TAESComp.EVP_Encrypt_AES256(
-          APayloadContent, APayloadEncryptionPassword);
-        LValid := AEncodedPayloadBytes <> '';
+          TEncoding.ANSI.GetBytes(APayloadContent), TEncoding.ANSI.GetBytes(APayloadEncryptionPassword));
+        LValid := AEncodedPayloadBytes <> Nil;
       end;
       end;
 
 
       pemNotEncrypt:
       pemNotEncrypt:
       begin
       begin
         // no encryption
         // no encryption
-        AEncodedPayloadBytes := APayloadContent;
+        AEncodedPayloadBytes := TEncoding.ANSI.GetBytes(APayloadContent);
         LValid := True;
         LValid := True;
       end
       end
 
 
@@ -1391,7 +1391,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-class function TWIZOperationsHelper.ExecuteChangeAccountInfo(const ASelectedAccounts, ASignerAccounts: TArray<TAccount>; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; const ANewName: string; const ANewType: word; var AErrorMessage: string): boolean;
+class function TWIZOperationsHelper.ExecuteChangeAccountInfo(const ASelectedAccounts, ASignerAccounts: TArray<TAccount>; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; const ANewName: TRawBytes; const ANewType: word; var AErrorMessage: string): boolean;
 var
 var
   LWalletKey: TWalletKey;
   LWalletKey: TWalletKey;
   LWalletKeys: TWalletKeys;
   LWalletKeys: TWalletKeys;
@@ -1399,10 +1399,10 @@ var
   LPCOperation: TPCOperation;
   LPCOperation: TPCOperation;
   LOperationsHashTree: TOperationsHashTree;
   LOperationsHashTree: TOperationsHashTree;
   LTotalSignerFee, LFee: int64;
   LTotalSignerFee, LFee: int64;
-  LOperationsTxt, LOperationToString, LTemp, LNewName: string;
+  LOperationsTxt, LOperationToString, LTemp: string;
   LAccountIdx, LNoOfOperations, LAccNumberIndex: integer;
   LAccountIdx, LNoOfOperations, LAccNumberIndex: integer;
   LCurrentAccount, LSignerAccount: TAccount;
   LCurrentAccount, LSignerAccount: TAccount;
-  LPayloadEncodedBytes: TRawBytes;
+  LPayloadEncodedBytes, LNewName: TRawBytes;
   LChangeType, LChangeName: boolean;
   LChangeType, LChangeName: boolean;
 begin
 begin
 
 
@@ -1430,28 +1430,28 @@ begin
       begin
       begin
         LSignerAccount := ASignerAccounts[0];
         LSignerAccount := ASignerAccounts[0];
 
 
-        LNewName := LowerCase(Trim(ANewName));
+        LNewName := ANewName;
 
 
-        if LNewName <> LCurrentAccount.Name then
+        If not TBaseType.Equals(LNewName,LCurrentAccount.name) then
         begin
         begin
           LChangeName := True;
           LChangeName := True;
-          if LNewName <> '' then
+          if LNewName <> Nil then
           begin
           begin
             if (not TPCSafeBox.ValidAccountName(LNewName, AErrorMessage)) then
             if (not TPCSafeBox.ValidAccountName(LNewName, AErrorMessage)) then
             begin
             begin
-              AErrorMessage := Format('New name "%s" is not a valid name: %s ', [LNewName, AErrorMessage]);
+              AErrorMessage := Format('New name "%s" is not a valid name: %s ', [LNewName.ToPrintable, AErrorMessage]);
               Exit(False);
               Exit(False);
             end;
             end;
             LAccNumberIndex := (TNode.Node.Bank.SafeBox.FindAccountByName(LNewName));
             LAccNumberIndex := (TNode.Node.Bank.SafeBox.FindAccountByName(LNewName));
             if (LAccNumberIndex >= 0) then
             if (LAccNumberIndex >= 0) then
             begin
             begin
-              AErrorMessage := Format('Name "%s" is used by account %s ', [LNewName, TAccountComp.AccountNumberToAccountTxtNumber(LAccNumberIndex)]);
+              AErrorMessage := Format('Name "%s" is used by account %s ', [LNewName.ToPrintable, TAccountComp.AccountNumberToAccountTxtNumber(LAccNumberIndex)]);
               Exit(False);
               Exit(False);
             end;
             end;
           end;
           end;
         end;
         end;
 
 
-        if (LNewName = LCurrentAccount.Name) and (ANewType = LCurrentAccount.account_type) then
+        if (TBaseType.Equals(LNewName, LCurrentAccount.Name)) and (ANewType = LCurrentAccount.account_type) then
         begin
         begin
           AErrorMessage := 'New account name and type are same as former.';
           AErrorMessage := 'New account name and type are same as former.';
           Exit(False);
           Exit(False);
@@ -1511,11 +1511,11 @@ begin
       try
       try
         if (LChangeName) and (LChangeType) then
         if (LChangeName) and (LChangeType) then
         begin
         begin
-          LTemp := Format('%d. Change Account %s Name and Type from [%s, %d] To [%s, %d] %s', [LNoOfOperations + 1, LCurrentAccount.DisplayString, LCurrentAccount.Name, LCurrentAccount.account_type, LNewName, ANewType, sLineBreak]);
+          LTemp := Format('%d. Change Account %s Name and Type from [%s, %d] To [%s, %d] %s', [LNoOfOperations + 1, LCurrentAccount.DisplayString, LCurrentAccount.Name.ToPrintable, LCurrentAccount.account_type, LNewName.ToPrintable, ANewType, sLineBreak]);
         end
         end
         else if LChangeName then
         else if LChangeName then
         begin
         begin
-          LTemp := Format('%d. Change Account %s Name from [%s] To [%s] %s', [LNoOfOperations + 1, LCurrentAccount.DisplayString, LCurrentAccount.Name, LNewName, sLineBreak]);
+          LTemp := Format('%d. Change Account %s Name from [%s] To [%s] %s', [LNoOfOperations + 1, LCurrentAccount.DisplayString, LCurrentAccount.Name.ToPrintable, LNewName.ToPrintable, sLineBreak]);
         end
         end
         else if LChangeType then
         else if LChangeType then
         begin
         begin

+ 2 - 2
src/gui-experimental/core.utils/UDataSources.pas

@@ -20,7 +20,7 @@ interface
 
 
 uses
 uses
   Classes, SysUtils, UAccounts, UNode, UBlockchain, UCrypto, UCoreObjects,
   Classes, SysUtils, UAccounts, UNode, UBlockchain, UCrypto, UCoreObjects,
-  UCommon, UMemory, UConst, UCommon.Data, UCoreUtils,
+  UCommon, UMemory, UConst, UCommon.Data, UCoreUtils, UBaseTypes,
   UCommon.Collections, Generics.Collections, Generics.Defaults, syncobjs;
   UCommon.Collections, Generics.Collections, Generics.Defaults, syncobjs;
 
 
 type
 type
@@ -167,7 +167,7 @@ begin
   else if ABindingName = 'Account' then
   else if ABindingName = 'Account' then
     Result := AItem.AccountString
     Result := AItem.AccountString
   else if ABindingName = 'Name' then
   else if ABindingName = 'Name' then
-    Result := AItem.Name
+    Result := AItem.Name.ToPrintable
   else if ABindingName = 'Display' then
   else if ABindingName = 'Display' then
     Result := AItem.DisplayString
     Result := AItem.DisplayString
   else if ABindingName = 'Balance' then
   else if ABindingName = 'Balance' then

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

@@ -75,7 +75,7 @@ function TWIZChangeAccountInfoWizard.FinishRequested(out message: ansistring): b
 var
 var
   LAccountArray: array of TAccount;
   LAccountArray: array of TAccount;
 begin
 begin
-  if Length(Model.Account.SelectedAccounts) = 1 then
+  if Model.Account.Count = 1 then
   begin
   begin
     SetLength(LAccountArray, 1);
     SetLength(LAccountArray, 1);
     LAccountArray[0] := Model.Signer.SignerAccount;
     LAccountArray[0] := Model.Signer.SignerAccount;

+ 5 - 4
src/gui-experimental/wizards/operations/UWIZChangeAccountInfo_Details.lfm

@@ -8,6 +8,7 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
   Caption = 'WIZChangeAccountInfo_Details'
   Caption = 'WIZChangeAccountInfo_Details'
   ClientHeight = 379
   ClientHeight = 379
   ClientWidth = 450
   ClientWidth = 450
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbName: TGroupBox
   object gbName: TGroupBox
     Left = 8
     Left = 8
@@ -37,8 +38,8 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
       Left = 16
       Left = 16
       Height = 15
       Height = 15
       Top = 8
       Top = 8
-      Width = 141
-      Caption = 'Please enter the new name'
+      Width = 121
+      Caption = 'Please enter new name'
       ParentColor = False
       ParentColor = False
       ParentFont = False
       ParentFont = False
     end
     end
@@ -84,8 +85,8 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
       Left = 16
       Left = 16
       Height = 15
       Height = 15
       Top = 11
       Top = 11
-      Width = 134
-      Caption = 'Please enter the new type'
+      Width = 114
+      Caption = 'Please enter new type'
       ParentColor = False
       ParentColor = False
     end
     end
     object lblTypeDetails: TLabel
     object lblTypeDetails: TLabel

+ 13 - 11
src/gui-experimental/wizards/operations/UWIZChangeAccountInfo_Details.pas

@@ -45,6 +45,8 @@ type
     procedure txtTypeChange(Sender: TObject);
     procedure txtTypeChange(Sender: TObject);
     procedure UpdateUI();
     procedure UpdateUI();
 
 
+
+
   public
   public
     procedure OnPresent; override;
     procedure OnPresent; override;
     procedure OnNext; override;
     procedure OnNext; override;
@@ -64,6 +66,7 @@ uses
   UAccounts,
   UAccounts,
   USettings,
   USettings,
   UCoreUtils,
   UCoreUtils,
+  UBaseTypes,
   UCoreObjects,
   UCoreObjects,
   UFRMAccountSelect,
   UFRMAccountSelect,
   UCommon.Collections,
   UCommon.Collections,
@@ -89,7 +92,7 @@ begin
   UpdateUI();
   UpdateUI();
   txtType.Text := '0';
   txtType.Text := '0';
 
 
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
   begin
     gbName.Enabled := False;
     gbName.Enabled := False;
   end
   end
@@ -126,7 +129,7 @@ begin
     LWizStepsToInject.Add(TWIZOperationPayload_Encryption);
     LWizStepsToInject.Add(TWIZOperationPayload_Encryption);
 
 
   // Signer section
   // Signer section
-  if Length(Model.Account.SelectedAccounts) = 1 then
+  if Model.Account.Count = 1 then
   begin
   begin
     LWizStepsToInject.Add(TWIZOperationSigner_Select); // special case for changeaccount info wizard
     LWizStepsToInject.Add(TWIZOperationSigner_Select); // special case for changeaccount info wizard
   end;
   end;
@@ -140,7 +143,7 @@ function TWIZChangeAccountInfo_Details.Validate(out message: ansistring): boolea
 var
 var
   LAccNumberIndex, LIdx, LErrCode: integer;
   LAccNumberIndex, LIdx, LErrCode: integer;
   LCurrentAccount: TAccount;
   LCurrentAccount: TAccount;
-  LNewName: string;
+  LNewName: TRawBytes;
   LNewType: word;
   LNewType: word;
 begin
 begin
   Result := True;
   Result := True;
@@ -157,30 +160,29 @@ begin
     end;
     end;
 
 
     // New name (only for single operations)
     // New name (only for single operations)
-    if Length(Model.Account.SelectedAccounts) = 1 then
+    if Model.Account.Count = 1 then
     begin
     begin
-      LNewName := LowerCase(Trim(txtName.Text));
+      LNewName.FromString(LowerCase(Trim(txtName.Text)));
 
 
-      if LNewName <> LCurrentAccount.Name then
+      if not TBaseType.Equals(LNewName, LCurrentAccount.Name) then
       begin
       begin
-
-        if LNewName <> '' then
+        if LNewName <> nil then
         begin
         begin
           if (not TPCSafeBox.ValidAccountName(LNewName, message)) then
           if (not TPCSafeBox.ValidAccountName(LNewName, message)) then
           begin
           begin
-            message := Format('New name "%s" is not a valid name: %s ', [LNewName, message]);
+            message := Format('New name "%s" is not a valid name: %s ', [LNewName.ToPrintable, message]);
             Exit(False);
             Exit(False);
           end;
           end;
           LAccNumberIndex := (TNode.Node.Bank.SafeBox.FindAccountByName(LNewName));
           LAccNumberIndex := (TNode.Node.Bank.SafeBox.FindAccountByName(LNewName));
           if (LAccNumberIndex >= 0) then
           if (LAccNumberIndex >= 0) then
           begin
           begin
-            message := Format('Name "%s" is used by account %s ', [LNewName, TAccountComp.AccountNumberToAccountTxtNumber(LAccNumberIndex)]);
+            message := Format('Name "%s" is used by account %s ', [LNewName.ToPrintable, TAccountComp.AccountNumberToAccountTxtNumber(LAccNumberIndex)]);
             Exit(False);
             Exit(False);
           end;
           end;
         end;
         end;
       end;
       end;
 
 
-      if (LNewName = LCurrentAccount.Name) and (LNewType = LCurrentAccount.account_type) then
+      if (TBaseType.Equals(LNewName, LCurrentAccount.Name)) and (LNewType = LCurrentAccount.account_type) then
       begin
       begin
         message := 'New account name and type are same as former.';
         message := 'New account name and type are same as former.';
         Exit(False);
         Exit(False);

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

@@ -7,6 +7,7 @@ object WIZChangeKey_EnterKey: TWIZChangeKey_EnterKey
   Caption = 'ChangeKey_EnterKey'
   Caption = 'ChangeKey_EnterKey'
   ClientHeight = 291
   ClientHeight = 291
   ClientWidth = 510
   ClientWidth = 510
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbNewPublicKey: TGroupBox
   object gbNewPublicKey: TGroupBox
     Left = 4
     Left = 4

+ 3 - 5
src/gui-experimental/wizards/operations/UWIZChangeKey_EnterKey.pas

@@ -59,7 +59,7 @@ uses
 
 
 procedure TWIZChangeKey_EnterKey.OnPresent;
 procedure TWIZChangeKey_EnterKey.OnPresent;
 begin
 begin
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
   begin
     chkChooseFee.Checked := True;
     chkChooseFee.Checked := True;
     chkChooseFee.Enabled := False;
     chkChooseFee.Enabled := False;
@@ -97,16 +97,14 @@ begin
   if not TAccountComp.AccountKeyFromImport(Trim(mmoNewPrivateKey.Lines.Text),
   if not TAccountComp.AccountKeyFromImport(Trim(mmoNewPrivateKey.Lines.Text),
     LTempAccountKey, message) then
     LTempAccountKey, message) then
   begin
   begin
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
   for LIdx := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
   for LIdx := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
     if TAccountComp.EqualAccountKeys(Model.Account.SelectedAccounts[LIdx].accountInfo.accountKey,
     if TAccountComp.EqualAccountKeys(Model.Account.SelectedAccounts[LIdx].accountInfo.accountKey,
       LTempAccountKey) then
       LTempAccountKey) then
     begin
     begin
-      Result := False;
       message := 'New Key Is Same As Current Key';
       message := 'New Key Is Same As Current Key';
-      Exit;
+      Exit(False);
     end;
     end;
 
 
   Model.TransferAccount.AccountKey := LTempAccountKey;
   Model.TransferAccount.AccountKey := LTempAccountKey;

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

@@ -7,6 +7,7 @@ object WIZChangeKey_SelectKey: TWIZChangeKey_SelectKey
   Caption = 'WIZChangeKey_SelectKey'
   Caption = 'WIZChangeKey_SelectKey'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbNewPrivateKey: TGroupBox
   object gbNewPrivateKey: TGroupBox
     Left = 4
     Left = 4

+ 3 - 5
src/gui-experimental/wizards/operations/UWIZChangeKey_SelectKey.pas

@@ -118,7 +118,7 @@ begin
   else
   else
     cbNewPrivateKey.ItemIndex := Model.ChangeAccountPrivateKey.SelectedIndex;
     cbNewPrivateKey.ItemIndex := Model.ChangeAccountPrivateKey.SelectedIndex;
   cbNewPrivateKeyChange(Self);
   cbNewPrivateKeyChange(Self);
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
   begin
     chkChooseFee.Checked := True;
     chkChooseFee.Checked := True;
     chkChooseFee.Enabled := False;
     chkChooseFee.Enabled := False;
@@ -156,8 +156,7 @@ begin
   if cbNewPrivateKey.ItemIndex < 1 then
   if cbNewPrivateKey.ItemIndex < 1 then
   begin
   begin
     message := 'A Key Must Be Selected';
     message := 'A Key Must Be Selected';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
 
 
   LAccountKey := TWallet.Keys.Key[PtrInt(cbNewPrivateKey.Items.Objects[cbNewPrivateKey.ItemIndex])].AccountKey;
   LAccountKey := TWallet.Keys.Key[PtrInt(cbNewPrivateKey.Items.Objects[cbNewPrivateKey.ItemIndex])].AccountKey;
@@ -166,9 +165,8 @@ begin
     if TAccountComp.EqualAccountKeys(Model.Account.SelectedAccounts[LIdx].accountInfo.accountKey,
     if TAccountComp.EqualAccountKeys(Model.Account.SelectedAccounts[LIdx].accountInfo.accountKey,
       LAccountKey) then
       LAccountKey) then
     begin
     begin
-      Result := False;
       message := 'New Key Is Same As Current Key';
       message := 'New Key Is Same As Current Key';
-      Exit;
+      Exit(False);
     end;
     end;
 
 
 end;
 end;

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZDelistAccountFromSale_Options.lfm

@@ -7,6 +7,7 @@ object WIZDelistAccountFromSale_Options: TWIZDelistAccountFromSale_Options
   Caption = 'WIZDelistAccountFromSale_Options'
   Caption = 'WIZDelistAccountFromSale_Options'
   ClientHeight = 263
   ClientHeight = 263
   ClientWidth = 429
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbOptions: TGroupBox
   object gbOptions: TGroupBox
     Left = 4
     Left = 4

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

@@ -56,7 +56,7 @@ uses
 
 
 procedure TWIZDelistAccountFromSale_Options.OnPresent;
 procedure TWIZDelistAccountFromSale_Options.OnPresent;
 begin
 begin
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
   begin
     chkChooseFee.Checked := True;
     chkChooseFee.Checked := True;
     chkChooseFee.Enabled := False;
     chkChooseFee.Enabled := False;

+ 1 - 1
src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterLockingBlock.lfm

@@ -7,7 +7,7 @@ object WIZEnlistAccountForSale_EnterLockingBlock: TWIZEnlistAccountForSale_Enter
   Caption = 'WIZEnlistAccountForSale_EnterLockingBlock'
   Caption = 'WIZEnlistAccountForSale_EnterLockingBlock'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
-  LCLVersion = '1.8.4.0'
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbLockBlock: TGroupBox
   object gbLockBlock: TGroupBox
     Left = 4
     Left = 4

+ 1 - 2
src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterLockingBlock.pas

@@ -60,8 +60,7 @@ begin
   if LLockedUntilBlock = 0 then
   if LLockedUntilBlock = 0 then
   begin
   begin
     message := 'You Didn''t Insert a Valid Locking Block.';
     message := 'You Didn''t Insert a Valid Locking Block.';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
   Model.EnlistAccountForSale.LockedUntilBlock := LLockedUntilBlock;
   Model.EnlistAccountForSale.LockedUntilBlock := LLockedUntilBlock;
 
 

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSaleAmount.lfm

@@ -7,6 +7,7 @@ object WIZEnlistAccountForSale_EnterSaleAmount: TWIZEnlistAccountForSale_EnterSa
   Caption = 'WIZEnlistAccountForSale_EnterSaleAmount'
   Caption = 'WIZEnlistAccountForSale_EnterSaleAmount'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbSalePrice: TGroupBox
   object gbSalePrice: TGroupBox
     Left = 4
     Left = 4

+ 3 - 5
src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSaleAmount.pas

@@ -69,7 +69,7 @@ end;
 procedure TWIZEnlistAccountForSale_EnterSaleAmount.OnPresent;
 procedure TWIZEnlistAccountForSale_EnterSaleAmount.OnPresent;
 begin
 begin
   UpdateUI();
   UpdateUI();
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
   begin
     chkChooseFee.Checked := True;
     chkChooseFee.Checked := True;
     chkChooseFee.Enabled := False;
     chkChooseFee.Enabled := False;
@@ -106,15 +106,13 @@ begin
   if not TAccountComp.TxtToMoney(edtAmt.Text, LSaleAmount) then
   if not TAccountComp.TxtToMoney(edtAmt.Text, LSaleAmount) then
   begin
   begin
     message := Format('Invalid Amount "%s"', [edtAmt.Text]);
     message := Format('Invalid Amount "%s"', [edtAmt.Text]);
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
 
 
   if LSaleAmount < 1 then
   if LSaleAmount < 1 then
   begin
   begin
     message := 'You Must Sell For An Amount Greater Than Zero.';
     message := 'You Must Sell For An Amount Greater Than Zero.';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
 
 
   Model.EnlistAccountForSale.SalePrice := LSaleAmount;
   Model.EnlistAccountForSale.SalePrice := LSaleAmount;

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

@@ -7,6 +7,7 @@ object WIZEnlistAccountForSale_EnterSeller: TWIZEnlistAccountForSale_EnterSeller
   Caption = 'WIZEnlistAccountForSale_EnterSeller'
   Caption = 'WIZEnlistAccountForSale_EnterSeller'
   ClientHeight = 286
   ClientHeight = 286
   ClientWidth = 450
   ClientWidth = 450
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbBeneficiary: TGroupBox
   object gbBeneficiary: TGroupBox
     Left = 8
     Left = 8

+ 5 - 7
src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSeller.pas

@@ -55,6 +55,7 @@ uses
   UWallet,
   UWallet,
   UAccounts,
   UAccounts,
   UCoreUtils,
   UCoreUtils,
+  UBaseTypes,
   UFRMAccountSelect;
   UFRMAccountSelect;
 
 
 { TWIZEnlistAccountForSale_EnterSeller }
 { TWIZEnlistAccountForSale_EnterSeller }
@@ -73,7 +74,7 @@ begin
     else
     else
     begin
     begin
       LAccount := TNode.Node.Operations.SafeBoxTransaction.account(LAccountNumber);
       LAccount := TNode.Node.Operations.SafeBoxTransaction.account(LAccountNumber);
-      lblBeneficiaryDetails.Caption := LAccount.Name;
+      lblBeneficiaryDetails.Caption := LAccount.Name.ToPrintable;
       lblBeneficiaryDetails.Visible := True;
       lblBeneficiaryDetails.Visible := True;
     end;
     end;
 end;
 end;
@@ -129,23 +130,20 @@ begin
   if not (TAccountComp.AccountTxtNumberToAccountNumber(edtBeneficiaryAcc.Text, LAccountNumber)) then
   if not (TAccountComp.AccountTxtNumberToAccountNumber(edtBeneficiaryAcc.Text, LAccountNumber)) then
   begin
   begin
     message := Format('Invalid Seller Account "%s"', [edtBeneficiaryAcc.Text]);
     message := Format('Invalid Seller Account "%s"', [edtBeneficiaryAcc.Text]);
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
 
 
   if (LAccountNumber < 0) or (LAccountNumber >= TNode.Node.Bank.AccountsCount) then
   if (LAccountNumber < 0) or (LAccountNumber >= TNode.Node.Bank.AccountsCount) then
   begin
   begin
     message := Format('Invalid Seller Account "%s"', [TAccountComp.AccountNumberToAccountTxtNumber(LAccountNumber)]);
     message := Format('Invalid Seller Account "%s"', [TAccountComp.AccountNumberToAccountTxtNumber(LAccountNumber)]);
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
 
 
   for LIdx := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
   for LIdx := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
     if (Model.Account.SelectedAccounts[LIdx].Account = LAccountNumber) then
     if (Model.Account.SelectedAccounts[LIdx].Account = LAccountNumber) then
     begin
     begin
       message := 'Seller Account Cannot Be Same As Account To Be Sold.';
       message := 'Seller Account Cannot Be Same As Account To Be Sold.';
-      Result := False;
-      Exit;
+      Exit(False);
     end;
     end;
 
 
   Model.EnlistAccountForSale.SellerAccount := TNode.Node.Operations.SafeBoxTransaction.account(LAccountNumber);
   Model.EnlistAccountForSale.SellerAccount := TNode.Node.Operations.SafeBoxTransaction.account(LAccountNumber);

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

@@ -42,6 +42,7 @@ type
       TAccountModel = class(TComponent)
       TAccountModel = class(TComponent)
       public
       public
         SelectedAccounts: TArray<TAccount>;
         SelectedAccounts: TArray<TAccount>;
+        Count: Integer;
       end;
       end;
 
 
       { TSendPASCModel }
       { TSendPASCModel }
@@ -116,7 +117,7 @@ type
 
 
       TChangeAccountInfoModel = class(TComponent)
       TChangeAccountInfoModel = class(TComponent)
       public
       public
-        NewName: string;
+        NewName: TRawBytes;
         NewType: Word;
         NewType: Word;
       end;
       end;
 
 

+ 2 - 2
src/gui-experimental/wizards/operations/UWIZOperationConfirmation.pas

@@ -100,7 +100,7 @@ begin
   FConfirmationGrid.SelectionType := stNone;
   FConfirmationGrid.SelectionType := stNone;
   FConfirmationGrid.Options := [vgoColAutoFill, vgoColSizing, vgoSortDirectionAllowNone, vgoAutoHidePaging];
   FConfirmationGrid.Options := [vgoColAutoFill, vgoColSizing, vgoSortDirectionAllowNone, vgoAutoHidePaging];
   LCaption := 'Confirm Operation';
   LCaption := 'Confirm Operation';
-  gpConfirmOperation.Caption := IIF(Length(Model.Account.SelectedAccounts) > 1, Format('%ss', [LCaption]), Format('%s', [LCaption]));
+  gpConfirmOperation.Caption := IIF(Model.Account.Count > 1, Format('%ss', [LCaption]), Format('%s', [LCaption]));
   with FConfirmationGrid.AddColumn('Sender') do
   with FConfirmationGrid.AddColumn('Sender') do
   begin
   begin
     StretchedToFill := True;
     StretchedToFill := True;
@@ -296,7 +296,7 @@ begin
       end;
       end;
       omtChangeInfo:
       omtChangeInfo:
       begin
       begin
-        if Length(Model.Account.SelectedAccounts) = 1 then
+        if Model.Account.Count = 1 then
         begin
         begin
           Result := Model.Signer.SignerAccount.AccountString;
           Result := Model.Signer.SignerAccount.AccountString;
         end
         end

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

@@ -7,6 +7,7 @@ object WIZOperationFee_Custom: TWIZOperationFee_Custom
   Caption = 'WIZOperationFee_Custom'
   Caption = 'WIZOperationFee_Custom'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbTransactionFee: TGroupBox
   object gbTransactionFee: TGroupBox
     Left = 0
     Left = 0

+ 4 - 4
src/gui-experimental/wizards/operations/UWIZOperationFee_Custom.pas

@@ -86,7 +86,7 @@ begin
     TSettings.Save;
     TSettings.Save;
   end;
   end;
   LAllUserAccountsExcludingPending := TCoreTool.GetUserAccounts(False);
   LAllUserAccountsExcludingPending := TCoreTool.GetUserAccounts(False);
-  Model.Signer.SignerCandidates := TCoreTool.GetSignerCandidates(Length(Model.Account.SelectedAccounts), Fee, LAllUserAccountsExcludingPending);
+  Model.Signer.SignerCandidates := TCoreTool.GetSignerCandidates(Model.Account.Count, Fee, LAllUserAccountsExcludingPending);
   Model.Fee.SingleOperationFee := Fee;
   Model.Fee.SingleOperationFee := Fee;
 
 
   // TODO: move this out -- inappropriate to have payload/signer considerations here
   // TODO: move this out -- inappropriate to have payload/signer considerations here
@@ -105,7 +105,7 @@ begin
 
 
       omtChangeInfo:
       omtChangeInfo:
       begin
       begin
-        if Length(Model.Account.SelectedAccounts) = 1 then
+        if Model.Account.Count = 1 then
         begin
         begin
           UpdatePath(ptInject, [TWIZOperationSigner_Select]);
           UpdatePath(ptInject, [TWIZOperationSigner_Select]);
         end;
         end;
@@ -125,7 +125,7 @@ var
   LAcc: TAccount;
   LAcc: TAccount;
 begin
 begin
   Result := True;
   Result := True;
-  if (Length(Model.Account.SelectedAccounts) > 1) and (Fee = 0) then
+  if (Model.Account.Count > 1) and (Fee = 0) then
   begin
   begin
     message := 'Zero fees only allowed for a single operation.';
     message := 'Zero fees only allowed for a single operation.';
     Exit(False);
     Exit(False);
@@ -145,7 +145,7 @@ end;
 
 
 procedure TWIZOperationFee_Custom.UpdateUI();
 procedure TWIZOperationFee_Custom.UpdateUI();
 begin
 begin
-  lblTotalFeeValue.Caption := Format('%s PASC', [TAccountComp.FormatMoney(Fee * Length(Model.Account.SelectedAccounts))]);
+  lblTotalFeeValue.Caption := Format('%s PASC', [TAccountComp.FormatMoney(Fee * Model.Account.Count)]);
 end;
 end;
 
 
 procedure TWIZOperationFee_Custom.fseFeeChange(Sender: TObject);
 procedure TWIZOperationFee_Custom.fseFeeChange(Sender: TObject);

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZOperationPayload_Content.lfm

@@ -7,6 +7,7 @@ object WIZOperationPayload_Content: TWIZOperationPayload_Content
   Caption = 'Form1'
   Caption = 'Form1'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object grpPayload: TGroupBox
   object grpPayload: TGroupBox
     Left = 8
     Left = 8

+ 2 - 3
src/gui-experimental/wizards/operations/UWIZOperationPayload_Content.pas

@@ -69,7 +69,7 @@ begin
 
 
     omtChangeInfo:
     omtChangeInfo:
     begin
     begin
-      if Length(Model.Account.SelectedAccounts) = 1 then
+      if Model.Account.Count = 1 then
       begin
       begin
         UpdatePath(ptInject, [TWIZOperationSigner_Select]);
         UpdatePath(ptInject, [TWIZOperationSigner_Select]);
       end;
       end;
@@ -88,8 +88,7 @@ begin
   if Length(mmoPayload.Lines.Text) > CT_MaxPayloadSize then
   if Length(mmoPayload.Lines.Text) > CT_MaxPayloadSize then
   begin
   begin
     message := Format('Payload Size Is Larger Than Max Payload Size Which Is "%u"', [CT_MaxPayloadSize]);
     message := Format('Payload Size Is Larger Than Max Payload Size Which Is "%u"', [CT_MaxPayloadSize]);
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
 end;
 end;
 
 

+ 1 - 0
src/gui-experimental/wizards/operations/UWIZOperationPayload_Encryption.lfm

@@ -7,6 +7,7 @@ object WIZOperationPayload_Encryption: TWIZOperationPayload_Encryption
   Caption = 'Form1'
   Caption = 'Form1'
   ClientHeight = 320
   ClientHeight = 320
   ClientWidth = 511
   ClientWidth = 511
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object grpPayload: TGroupBox
   object grpPayload: TGroupBox
     Left = 8
     Left = 8

+ 1 - 2
src/gui-experimental/wizards/operations/UWIZOperationPayload_Encryption.pas

@@ -99,8 +99,7 @@ begin
     (not rbEncryptedWithRecipient.Checked) and (not rbEncryptedWithPassword.Checked) then
     (not rbEncryptedWithRecipient.Checked) and (not rbEncryptedWithPassword.Checked) then
   begin
   begin
     message := 'You must select an encryption option for payload';
     message := 'You must select an encryption option for payload';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
 
 
   case Model.ExecuteOperationType of
   case Model.ExecuteOperationType of

+ 1 - 1
src/gui-experimental/wizards/operations/UWIZOperationPayload_Password.lfm

@@ -7,7 +7,7 @@ object WIZOperationPayload_Password: TWIZOperationPayload_Password
   Caption = 'Form1'
   Caption = 'Form1'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
-  LCLVersion = '1.8.4.0'
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object grpPayload: TGroupBox
   object grpPayload: TGroupBox
     Left = 8
     Left = 8

+ 1 - 2
src/gui-experimental/wizards/operations/UWIZOperationPayload_Password.pas

@@ -68,8 +68,7 @@ begin
   if Length(Trim(edtPassword.Text)) = 0 then
   if Length(Trim(edtPassword.Text)) = 0 then
   begin
   begin
     message := 'Password Cannot Be Empty';
     message := 'Password Cannot Be Empty';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
 end;
 end;
 
 

+ 4 - 6
src/gui-experimental/wizards/operations/UWIZOperationSelected.pas

@@ -88,7 +88,7 @@ begin
   FSelectedAccountsGrid.SelectionType := stNone;
   FSelectedAccountsGrid.SelectionType := stNone;
   FSelectedAccountsGrid.Options := [vgoColAutoFill, vgoColSizing, vgoSortDirectionAllowNone, vgoAutoHidePaging];
   FSelectedAccountsGrid.Options := [vgoColAutoFill, vgoColSizing, vgoSortDirectionAllowNone, vgoAutoHidePaging];
   LCaption := 'Selected Account';
   LCaption := 'Selected Account';
-  gpSelectedAccount.Caption := IIF(Length(Model.Account.SelectedAccounts) > 1, Format('%ss', [LCaption]), Format('%s', [LCaption]));
+  gpSelectedAccount.Caption := IIF(Model.Account.Count > 1, Format('%ss', [LCaption]), Format('%s', [LCaption]));
   with FSelectedAccountsGrid.AddColumn('Account') do
   with FSelectedAccountsGrid.AddColumn('Account') do
   begin
   begin
     StretchedToFill := True;
     StretchedToFill := True;
@@ -132,7 +132,7 @@ var
   LAllUserAccountsExcludingPending: TArray<TAccount>;
   LAllUserAccountsExcludingPending: TArray<TAccount>;
 begin
 begin
   LAllUserAccountsExcludingPending := TCoreTool.GetUserAccounts(False);
   LAllUserAccountsExcludingPending := TCoreTool.GetUserAccounts(False);
-  Model.Signer.SignerCandidates := TCoreTool.GetSignerCandidates(Length(Model.Account.SelectedAccounts), IIF(TSettings.DefaultFee = 0, 1, TSettings.DefaultFee), LAllUserAccountsExcludingPending);
+  Model.Signer.SignerCandidates := TCoreTool.GetSignerCandidates(Model.Account.Count, IIF(TSettings.DefaultFee = 0, 1, TSettings.DefaultFee), LAllUserAccountsExcludingPending);
 end;
 end;
 
 
 function TWIZOperationSelected.Validate(out message: ansistring): boolean;
 function TWIZOperationSelected.Validate(out message: ansistring): boolean;
@@ -159,9 +159,8 @@ begin
         LAccount := model.Account.SelectedAccounts[LIdx];
         LAccount := model.Account.SelectedAccounts[LIdx];
         if TAccountComp.IsAccountForSale(LAccount.accountInfo) then
         if TAccountComp.IsAccountForSale(LAccount.accountInfo) then
         begin
         begin
-          Result := False;
           message := Format('Account "%s" is already enlisted for sale', [LAccount.AccountString]);
           message := Format('Account "%s" is already enlisted for sale', [LAccount.AccountString]);
-          Exit;
+          Exit(False);
         end;
         end;
       end;
       end;
 
 
@@ -171,9 +170,8 @@ begin
         LAccount := model.Account.SelectedAccounts[LIdx];
         LAccount := model.Account.SelectedAccounts[LIdx];
         if not TAccountComp.IsAccountForSale(LAccount.accountInfo) then
         if not TAccountComp.IsAccountForSale(LAccount.accountInfo) then
         begin
         begin
-          Result := False;
           message := Format('Account "%s" is not enlisted for sale so cannot be delisted', [LAccount.AccountString]);
           message := Format('Account "%s" is not enlisted for sale so cannot be delisted', [LAccount.AccountString]);
-          Exit;
+          Exit(False);
         end;
         end;
       end;
       end;
   end;
   end;

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

@@ -7,6 +7,7 @@ object WIZOperationSigner_Select: TWIZOperationSigner_Select
   Caption = 'WIZOperationSigner_Select'
   Caption = 'WIZOperationSigner_Select'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbTransaction: TGroupBox
   object gbTransaction: TGroupBox
     Left = 16
     Left = 16

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

@@ -121,8 +121,7 @@ begin
   if cbSignerAccount.ItemIndex < 1 then
   if cbSignerAccount.ItemIndex < 1 then
   begin
   begin
     message := 'A Signer Account Must Be Selected';
     message := 'A Signer Account Must Be Selected';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   end;
 
 
 end;
 end;

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

@@ -8,6 +8,7 @@ object WIZSendPASC_Details: TWIZSendPASC_Details
   Caption = 'WIZSendPASC_Details'
   Caption = 'WIZSendPASC_Details'
   ClientHeight = 379
   ClientHeight = 379
   ClientWidth = 450
   ClientWidth = 450
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbRecipient: TGroupBox
   object gbRecipient: TGroupBox
     Left = 8
     Left = 8

+ 4 - 3
src/gui-experimental/wizards/operations/UWIZSendPASC_Details.pas

@@ -66,6 +66,7 @@ uses
   UAccounts,
   UAccounts,
   USettings,
   USettings,
   UCoreUtils,
   UCoreUtils,
+  UBaseTypes,
   UCoreObjects,
   UCoreObjects,
   UFRMAccountSelect,
   UFRMAccountSelect,
   UCommon.Collections,
   UCommon.Collections,
@@ -88,7 +89,7 @@ begin
   txtRecipient.SetFocus;
   txtRecipient.SetFocus;
 
 
   // Quantity section
   // Quantity section
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
   begin
     chkCustomFee.Checked := True;
     chkCustomFee.Checked := True;
     chkCustomFee.Enabled := False;
     chkCustomFee.Enabled := False;
@@ -107,7 +108,7 @@ begin
     else
     else
     begin
     begin
       LTempAccount := TNode.Node.Operations.SafeBoxTransaction.account(LAccountNumber);
       LTempAccount := TNode.Node.Operations.SafeBoxTransaction.account(LAccountNumber);
-      lblRecipientDetails.Caption := LTempAccount.Name;
+      lblRecipientDetails.Caption := LTempAccount.Name.ToPrintable;
     end;
     end;
 
 
   // Quantity section
   // Quantity section
@@ -161,7 +162,7 @@ begin
     LWizStepsToInject.Add(TWIZOperationPayload_Encryption);
     LWizStepsToInject.Add(TWIZOperationPayload_Encryption);
 
 
   // Signer section
   // Signer section
-  if Length(Model.Account.SelectedAccounts) = 1 then
+  if Model.Account.Count = 1 then
   begin
   begin
     Model.Signer.SignerAccount := Model.Account.SelectedAccounts[0];
     Model.Signer.SignerAccount := Model.Account.SelectedAccounts[0];
     Model.Signer.OperationSigningMode := akaPrimary;
     Model.Signer.OperationSigningMode := akaPrimary;

+ 1 - 1
src/pascalcoin_wallet_experimental.lpi

@@ -646,7 +646,7 @@
     </Target>
     </Target>
     <SearchPaths>
     <SearchPaths>
       <IncludeFiles Value="$(ProjOutDir);libraries\generics.collections\inc"/>
       <IncludeFiles Value="$(ProjOutDir);libraries\generics.collections\inc"/>
-      <OtherUnitFiles Value="core;gui-experimental;libraries\synapse;libraries\sphere10;libraries\hashlib4pascal;libraries\generics.collections;libraries\pascalcoin;gui-experimental\core.utils;gui-experimental\wizards\wallet;gui-experimental\wizards\operations;gui-classic;libraries\paszlib"/>
+      <OtherUnitFiles Value="core;gui-experimental;libraries\synapse;libraries\sphere10;libraries\hashlib4pascal;libraries\generics.collections;libraries\pascalcoin;gui-experimental\core.utils;gui-experimental\wizards\wallet;gui-experimental\wizards\operations;libraries\paszlib;gui-classic"/>
       <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
       <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
     </SearchPaths>
     </SearchPaths>
     <Parsing>
     <Parsing>