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
   OnCreate = FormCreate
   OnDestroy = FormDestroy
-  LCLVersion = '1.8.4.0'
+  LCLVersion = '1.8.2.0'
   Visible = False
   object paSplash: TPanel
     Left = 0

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -49,7 +49,7 @@ type
     FMessagesUnreadCount : Integer;
     { private declarations }
     procedure UpdateAvailableConnections;
-    procedure OnNodeMessageEvent(NetConnection : TNetConnection; MessageData : TRawBytes);
+    procedure OnNodeMessageEvent(NetConnection : TNetConnection; MessageData : String);
   public
     { public declarations }
   end;
@@ -77,7 +77,7 @@ begin
   TUserInterface.NodeMessageEvent.Remove(OnNodeMessageEvent);
 end;
 
-procedure TFRMMessages.OnNodeMessageEvent(NetConnection: TNetConnection; MessageData: TRawBytes);
+procedure TFRMMessages.OnNodeMessageEvent(NetConnection: TNetConnection; MessageData: String);
 Var s : String;
 begin
   inc(FMessagesUnreadCount);
@@ -88,11 +88,11 @@ begin
     if TSettings.ShowModalMessages then begin
       s := DateTimeToStr(now)+' Message from '+NetConnection.ClientRemoteAddr+#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;
       end else begin
          s := s +'Value in hexadecimal:'+#10+
-              TCrypto.ToHexaString(MessageData);
+              TCrypto.ToHexaString(TEncoding.ANSI.GetBytes(MessageData));
       end;
       Application.MessageBox(PChar(s),PChar(Application.Title),MB_ICONINFORMATION+MB_OK);
     end;
@@ -148,7 +148,7 @@ begin
   basem := memoMessageToSend.Lines.Text;
   m := '';
   // 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]
     else m:=m+'.';
   end;

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

@@ -16,7 +16,6 @@ object FRMOperation: TFRMOperation
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
-  LCLVersion = '1.8.2.0'
   Visible = False
   object lblAccountCaption: TLabel
     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 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 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 OnSenderAccountsChanged(Sender : TObject);
     procedure OnWalletKeysChanged(Sender : TObject);
@@ -607,7 +607,7 @@ begin
   end;
   If SenderAccounts.Count>=1 then begin
     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);
   end else begin
     ebSignerAccount.text := '';
@@ -795,7 +795,7 @@ begin
 end;
 
 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;
   i : Integer;
   errCode : Integer;
@@ -836,17 +836,17 @@ begin
       exit;
     end;
     // 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;
-      If newName<>'' then begin
+      If Length(newName)>0 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;
         end;
         i := (FNode.Bank.SafeBox.FindAccountByName(newName));
         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;
         end;
       end;
@@ -998,7 +998,7 @@ Var
   salePrice, amount : Int64;
   auxC : Cardinal;
   changeName,changeType : Boolean;
-  newName : AnsiString;
+  newName : TRawBytes;
   newType : Word;
 begin
   Result := false;
@@ -1244,8 +1244,8 @@ Var payload_u : AnsiString;
   wk : TWalletKey;
 begin
   valid := false;
-  payload_encrypted := '';
-  FEncodedPayload := '';
+  payload_encrypted := Nil;
+  FEncodedPayload := Nil;
   errors := 'Unknown error';
   payload_u := memoPayload.Lines.Text;
   try
@@ -1257,8 +1257,8 @@ begin
       // Use sender
       errors := 'Error encrypting';
       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
       errors := 'Error encrypting';
       if (PageControlOpType.ActivePage=tsTransaction) or (PageControlOpType.ActivePage=tsListForSale) or (PageControlOpType.ActivePage=tsDelist)
@@ -1293,8 +1293,8 @@ begin
           exit;
         end;
         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
         if (rbChangeKeyWithAnother.Checked) then begin
           // With new key generated
@@ -1315,8 +1315,8 @@ begin
           exit;
         end;
         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
           valid := false;
           errors := 'Selected private key is not valid to encode';
@@ -1326,10 +1326,10 @@ begin
         errors := 'This operation does not allow this kind of payload';
       end;
     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
-      payload_encrypted := payload_u;
+      payload_encrypted := TEncoding.ANSI.GetBytes(payload_u);
       valid := true;
     end else begin
       errors := 'Must select an encryption option for payload';

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

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

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

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

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

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

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

@@ -343,7 +343,7 @@ begin
 end;
 
 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;
   begin
     Result := false;
@@ -359,7 +359,7 @@ procedure TFRMPayloadDecoder.TryToDecode;
 
   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;
   Begin
     Result := false;
@@ -377,24 +377,25 @@ procedure TFRMPayloadDecoder.TryToDecode;
 
 Var raw : TRawBytes;
   WalletKey : TWalletKey;
-  Decrypted,PasswordUsed : AnsiString;
+  Decrypted: TRawBytes;
+  PasswordUsed : AnsiString;
   ok : boolean;
 begin
   ok := true;
   raw := FOpResume.OriginalPayload;
-  if raw<>'' then begin
+  if Length(raw)>0 then begin
     // First try to a human readable...
     if (cbMethodPublicPayload.Checked) and (TCrypto.IsHumanReadable(raw)) then begin
       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';
     end else if (cbUsingPrivateKeys.Checked) And (UseWallet(raw,Decrypted,WalletKey)) then begin
       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);
     end else if (cbUsingPasswords.Checked) And (UsePassword(raw,Decrypted,PasswordUsed)) then begin
       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+'"';
     end else begin
       memoDecoded.Lines.Text := 'CANNOT DECRYPT';

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

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

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

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

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

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

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

@@ -305,7 +305,7 @@ begin
     if (Random(500)<1) then fees := 0
     else fees := 1; // Minimal fee
     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
         if operationsComp.AddOperation(True,opTx,errors) then inc(Result);
       finally
@@ -394,7 +394,7 @@ begin
               end;
               1 : begin
                 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;
             else
               changer.Changes_type:=[account_type];

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

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

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

@@ -99,9 +99,9 @@ const
     Target: 0;
     HashRateTargetKhs: 0;
     HashRateKhs: 0;
-    MinerPayload: '';
-    PoW: '';
-    SafeBoxHash: '';
+    MinerPayload: Nil;
+    PoW: Nil;
+    SafeBoxHash: Nil;
     AccumulatedWork: 0;
     TimeAverage200: 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 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 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;
 
 
@@ -546,9 +546,9 @@ end;
 
 class function TAccountKeyComparer.DoCompare(constref ALeft, ARight: TAccountKey): integer;
 begin
-  Result := BinStrComp(ALeft.x, ARight.x);
+  Result := BytesCompare(ALeft.x, ARight.x);
   if Result = 0 then
-    Result := BinStrComp(ALeft.y, ARight.y);
+    Result := BytesCompare(ALeft.y, ARight.y);
 end;
 
 { TAccountKeyEqualityComparer }
@@ -570,7 +570,7 @@ end;
 
 class function TAccountKeyEqualityComparer.CalcHashCode(constref AValue: TAccountKey): UInt32;
 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;
 
 { TAccountHelper }
@@ -583,8 +583,8 @@ end;
 function TAccountHelper.GetDisplayString: ansistring;
 begin
   Result := GetAccountString;
-  if Self.Name <> '' then
-    Result := Result + ': ' + Self.Name;
+  if Self.Name <> Nil then
+    Result := Result + ': ' + Self.Name.ToString;
 end;
 
 function TAccountHelper.GetInfoText(const ABank: TPCBank): utf8string;
@@ -593,7 +593,7 @@ var
   GC: TDisposables;
 begin
   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(Format('Current balance: %s', [TAccountComp.FormatMoney(Self.balance)]));
   builder.Append('');
@@ -650,9 +650,9 @@ begin
   builder.Add(Format('%s', [Self.OperationTxt]));
   builder.Add(Format('OpType:%d Subtype:%d', [Self.OpType, Self.OpSubtype]));
   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)]));
-  if (Self.OriginalPayload <> '') then
+  if (Self.OriginalPayload <> Nil) then
   begin
     builder.Add(Format('Payload length:%d', [length(Self.OriginalPayload)]));
     if Self.PrintablePayload <> '' then
@@ -789,15 +789,15 @@ begin
       pemEncryptWithSender:
       begin
         // Use sender public key
-        AEncodedPayloadBytes := ECIESEncrypt(ASenderPublicKey, APayloadContent);
-        LValid := AEncodedPayloadBytes <> '';
+        AEncodedPayloadBytes := ECIESEncrypt(ASenderPublicKey, TEncoding.ANSI.GetBytes(APayloadContent));
+        LValid := AEncodedPayloadBytes <> Nil;
       end;
 
       pemEncryptWithRecipient:
       begin
         // With destination public key
-        AEncodedPayloadBytes := ECIESEncrypt(ADestinationPublicKey, APayloadContent);
-        LValid := AEncodedPayloadBytes <> '';
+        AEncodedPayloadBytes := ECIESEncrypt(ADestinationPublicKey, TEncoding.ANSI.GetBytes(APayloadContent));
+        LValid := AEncodedPayloadBytes <> Nil;
       end;
 
       pemEncryptWithPassword:
@@ -809,14 +809,14 @@ begin
           Exit(False);
         end;
         AEncodedPayloadBytes := TAESComp.EVP_Encrypt_AES256(
-          APayloadContent, APayloadEncryptionPassword);
-        LValid := AEncodedPayloadBytes <> '';
+          TEncoding.ANSI.GetBytes(APayloadContent), TEncoding.ANSI.GetBytes(APayloadEncryptionPassword));
+        LValid := AEncodedPayloadBytes <> Nil;
       end;
 
       pemNotEncrypt:
       begin
         // no encryption
-        AEncodedPayloadBytes := APayloadContent;
+        AEncodedPayloadBytes := TEncoding.ANSI.GetBytes(APayloadContent);
         LValid := True;
       end
 
@@ -1391,7 +1391,7 @@ begin
   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
   LWalletKey: TWalletKey;
   LWalletKeys: TWalletKeys;
@@ -1399,10 +1399,10 @@ var
   LPCOperation: TPCOperation;
   LOperationsHashTree: TOperationsHashTree;
   LTotalSignerFee, LFee: int64;
-  LOperationsTxt, LOperationToString, LTemp, LNewName: string;
+  LOperationsTxt, LOperationToString, LTemp: string;
   LAccountIdx, LNoOfOperations, LAccNumberIndex: integer;
   LCurrentAccount, LSignerAccount: TAccount;
-  LPayloadEncodedBytes: TRawBytes;
+  LPayloadEncodedBytes, LNewName: TRawBytes;
   LChangeType, LChangeName: boolean;
 begin
 
@@ -1430,28 +1430,28 @@ begin
       begin
         LSignerAccount := ASignerAccounts[0];
 
-        LNewName := LowerCase(Trim(ANewName));
+        LNewName := ANewName;
 
-        if LNewName <> LCurrentAccount.Name then
+        If not TBaseType.Equals(LNewName,LCurrentAccount.name) then
         begin
           LChangeName := True;
-          if LNewName <> '' then
+          if LNewName <> Nil then
           begin
             if (not TPCSafeBox.ValidAccountName(LNewName, AErrorMessage)) then
             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);
             end;
             LAccNumberIndex := (TNode.Node.Bank.SafeBox.FindAccountByName(LNewName));
             if (LAccNumberIndex >= 0) then
             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);
             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
           AErrorMessage := 'New account name and type are same as former.';
           Exit(False);
@@ -1511,11 +1511,11 @@ begin
       try
         if (LChangeName) and (LChangeType) then
         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
         else if LChangeName then
         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
         else if LChangeType then
         begin

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

@@ -20,7 +20,7 @@ interface
 
 uses
   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;
 
 type
@@ -167,7 +167,7 @@ begin
   else if ABindingName = 'Account' then
     Result := AItem.AccountString
   else if ABindingName = 'Name' then
-    Result := AItem.Name
+    Result := AItem.Name.ToPrintable
   else if ABindingName = 'Display' then
     Result := AItem.DisplayString
   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
   LAccountArray: array of TAccount;
 begin
-  if Length(Model.Account.SelectedAccounts) = 1 then
+  if Model.Account.Count = 1 then
   begin
     SetLength(LAccountArray, 1);
     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'
   ClientHeight = 379
   ClientWidth = 450
+  LCLVersion = '1.8.2.0'
   Visible = False
   object gbName: TGroupBox
     Left = 8
@@ -37,8 +38,8 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
       Left = 16
       Height = 15
       Top = 8
-      Width = 141
-      Caption = 'Please enter the new name'
+      Width = 121
+      Caption = 'Please enter new name'
       ParentColor = False
       ParentFont = False
     end
@@ -84,8 +85,8 @@ object WIZChangeAccountInfo_Details: TWIZChangeAccountInfo_Details
       Left = 16
       Height = 15
       Top = 11
-      Width = 134
-      Caption = 'Please enter the new type'
+      Width = 114
+      Caption = 'Please enter new type'
       ParentColor = False
     end
     object lblTypeDetails: TLabel

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

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

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

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

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

@@ -59,7 +59,7 @@ uses
 
 procedure TWIZChangeKey_EnterKey.OnPresent;
 begin
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
     chkChooseFee.Checked := True;
     chkChooseFee.Enabled := False;
@@ -97,16 +97,14 @@ begin
   if not TAccountComp.AccountKeyFromImport(Trim(mmoNewPrivateKey.Lines.Text),
     LTempAccountKey, message) then
   begin
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   for LIdx := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
     if TAccountComp.EqualAccountKeys(Model.Account.SelectedAccounts[LIdx].accountInfo.accountKey,
       LTempAccountKey) then
     begin
-      Result := False;
       message := 'New Key Is Same As Current Key';
-      Exit;
+      Exit(False);
     end;
 
   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'
   ClientHeight = 253
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   object gbNewPrivateKey: TGroupBox
     Left = 4

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

@@ -118,7 +118,7 @@ begin
   else
     cbNewPrivateKey.ItemIndex := Model.ChangeAccountPrivateKey.SelectedIndex;
   cbNewPrivateKeyChange(Self);
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
     chkChooseFee.Checked := True;
     chkChooseFee.Enabled := False;
@@ -156,8 +156,7 @@ begin
   if cbNewPrivateKey.ItemIndex < 1 then
   begin
     message := 'A Key Must Be Selected';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
 
   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,
       LAccountKey) then
     begin
-      Result := False;
       message := 'New Key Is Same As Current Key';
-      Exit;
+      Exit(False);
     end;
 
 end;

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

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

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

@@ -56,7 +56,7 @@ uses
 
 procedure TWIZDelistAccountFromSale_Options.OnPresent;
 begin
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
     chkChooseFee.Checked := True;
     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'
   ClientHeight = 253
   ClientWidth = 429
-  LCLVersion = '1.8.4.0'
+  LCLVersion = '1.8.2.0'
   Visible = False
   object gbLockBlock: TGroupBox
     Left = 4

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

@@ -60,8 +60,7 @@ begin
   if LLockedUntilBlock = 0 then
   begin
     message := 'You Didn''t Insert a Valid Locking Block.';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
   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'
   ClientHeight = 253
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   object gbSalePrice: TGroupBox
     Left = 4

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

@@ -69,7 +69,7 @@ end;
 procedure TWIZEnlistAccountForSale_EnterSaleAmount.OnPresent;
 begin
   UpdateUI();
-  if Length(Model.Account.SelectedAccounts) > 1 then
+  if Model.Account.Count > 1 then
   begin
     chkChooseFee.Checked := True;
     chkChooseFee.Enabled := False;
@@ -106,15 +106,13 @@ begin
   if not TAccountComp.TxtToMoney(edtAmt.Text, LSaleAmount) then
   begin
     message := Format('Invalid Amount "%s"', [edtAmt.Text]);
-    Result := False;
-    Exit;
+    Exit(False);
   end;
 
   if LSaleAmount < 1 then
   begin
     message := 'You Must Sell For An Amount Greater Than Zero.';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
 
   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'
   ClientHeight = 286
   ClientWidth = 450
+  LCLVersion = '1.8.2.0'
   Visible = False
   object gbBeneficiary: TGroupBox
     Left = 8

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

@@ -55,6 +55,7 @@ uses
   UWallet,
   UAccounts,
   UCoreUtils,
+  UBaseTypes,
   UFRMAccountSelect;
 
 { TWIZEnlistAccountForSale_EnterSeller }
@@ -73,7 +74,7 @@ begin
     else
     begin
       LAccount := TNode.Node.Operations.SafeBoxTransaction.account(LAccountNumber);
-      lblBeneficiaryDetails.Caption := LAccount.Name;
+      lblBeneficiaryDetails.Caption := LAccount.Name.ToPrintable;
       lblBeneficiaryDetails.Visible := True;
     end;
 end;
@@ -129,23 +130,20 @@ begin
   if not (TAccountComp.AccountTxtNumberToAccountNumber(edtBeneficiaryAcc.Text, LAccountNumber)) then
   begin
     message := Format('Invalid Seller Account "%s"', [edtBeneficiaryAcc.Text]);
-    Result := False;
-    Exit;
+    Exit(False);
   end;
 
   if (LAccountNumber < 0) or (LAccountNumber >= TNode.Node.Bank.AccountsCount) then
   begin
     message := Format('Invalid Seller Account "%s"', [TAccountComp.AccountNumberToAccountTxtNumber(LAccountNumber)]);
-    Result := False;
-    Exit;
+    Exit(False);
   end;
 
   for LIdx := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
     if (Model.Account.SelectedAccounts[LIdx].Account = LAccountNumber) then
     begin
       message := 'Seller Account Cannot Be Same As Account To Be Sold.';
-      Result := False;
-      Exit;
+      Exit(False);
     end;
 
   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)
       public
         SelectedAccounts: TArray<TAccount>;
+        Count: Integer;
       end;
 
       { TSendPASCModel }
@@ -116,7 +117,7 @@ type
 
       TChangeAccountInfoModel = class(TComponent)
       public
-        NewName: string;
+        NewName: TRawBytes;
         NewType: Word;
       end;
 

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

@@ -100,7 +100,7 @@ begin
   FConfirmationGrid.SelectionType := stNone;
   FConfirmationGrid.Options := [vgoColAutoFill, vgoColSizing, vgoSortDirectionAllowNone, vgoAutoHidePaging];
   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
   begin
     StretchedToFill := True;
@@ -296,7 +296,7 @@ begin
       end;
       omtChangeInfo:
       begin
-        if Length(Model.Account.SelectedAccounts) = 1 then
+        if Model.Account.Count = 1 then
         begin
           Result := Model.Signer.SignerAccount.AccountString;
         end

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

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

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

@@ -86,7 +86,7 @@ begin
     TSettings.Save;
   end;
   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;
 
   // TODO: move this out -- inappropriate to have payload/signer considerations here
@@ -105,7 +105,7 @@ begin
 
       omtChangeInfo:
       begin
-        if Length(Model.Account.SelectedAccounts) = 1 then
+        if Model.Account.Count = 1 then
         begin
           UpdatePath(ptInject, [TWIZOperationSigner_Select]);
         end;
@@ -125,7 +125,7 @@ var
   LAcc: TAccount;
 begin
   Result := True;
-  if (Length(Model.Account.SelectedAccounts) > 1) and (Fee = 0) then
+  if (Model.Account.Count > 1) and (Fee = 0) then
   begin
     message := 'Zero fees only allowed for a single operation.';
     Exit(False);
@@ -145,7 +145,7 @@ end;
 
 procedure TWIZOperationFee_Custom.UpdateUI();
 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;
 
 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'
   ClientHeight = 253
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   object grpPayload: TGroupBox
     Left = 8

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

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

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

@@ -7,6 +7,7 @@ object WIZOperationPayload_Encryption: TWIZOperationPayload_Encryption
   Caption = 'Form1'
   ClientHeight = 320
   ClientWidth = 511
+  LCLVersion = '1.8.2.0'
   Visible = False
   object grpPayload: TGroupBox
     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
   begin
     message := 'You must select an encryption option for payload';
-    Result := False;
-    Exit;
+    Exit(False);
   end;
 
   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'
   ClientHeight = 253
   ClientWidth = 429
-  LCLVersion = '1.8.4.0'
+  LCLVersion = '1.8.2.0'
   Visible = False
   object grpPayload: TGroupBox
     Left = 8

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

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

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

@@ -88,7 +88,7 @@ begin
   FSelectedAccountsGrid.SelectionType := stNone;
   FSelectedAccountsGrid.Options := [vgoColAutoFill, vgoColSizing, vgoSortDirectionAllowNone, vgoAutoHidePaging];
   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
   begin
     StretchedToFill := True;
@@ -132,7 +132,7 @@ var
   LAllUserAccountsExcludingPending: TArray<TAccount>;
 begin
   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;
 
 function TWIZOperationSelected.Validate(out message: ansistring): boolean;
@@ -159,9 +159,8 @@ begin
         LAccount := model.Account.SelectedAccounts[LIdx];
         if TAccountComp.IsAccountForSale(LAccount.accountInfo) then
         begin
-          Result := False;
           message := Format('Account "%s" is already enlisted for sale', [LAccount.AccountString]);
-          Exit;
+          Exit(False);
         end;
       end;
 
@@ -171,9 +170,8 @@ begin
         LAccount := model.Account.SelectedAccounts[LIdx];
         if not TAccountComp.IsAccountForSale(LAccount.accountInfo) then
         begin
-          Result := False;
           message := Format('Account "%s" is not enlisted for sale so cannot be delisted', [LAccount.AccountString]);
-          Exit;
+          Exit(False);
         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'
   ClientHeight = 253
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   object gbTransaction: TGroupBox
     Left = 16

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

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

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

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

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

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

+ 1 - 1
src/pascalcoin_wallet_experimental.lpi

@@ -646,7 +646,7 @@
     </Target>
     <SearchPaths>
       <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)"/>
     </SearchPaths>
     <Parsing>