Browse Source

add buyaccount wizard.

Ugochukwu Mmaduekwe 6 years ago
parent
commit
c948986f04
22 changed files with 1536 additions and 53 deletions
  1. 4 0
      src/gui-experimental/UCTRLWallet.lfm
  2. 8 0
      src/gui-experimental/UCTRLWallet.pas
  3. 1 1
      src/gui-experimental/UFRMWalletKeys.lfm
  4. 16 1
      src/gui-experimental/UUserInterface.pas
  5. 1 1
      src/gui-experimental/core.utils/UCoreObjects.pas
  6. 140 30
      src/gui-experimental/core.utils/UCoreUtils.pas
  7. 86 0
      src/gui-experimental/wizards/operations/UWIZBuyAccount.pas
  8. 950 0
      src/gui-experimental/wizards/operations/UWIZBuyAccount_Details.lfm
  9. 286 0
      src/gui-experimental/wizards/operations/UWIZBuyAccount_Details.pas
  10. 0 1
      src/gui-experimental/wizards/operations/UWIZChangeAccountInfo_Details.lfm
  11. 0 1
      src/gui-experimental/wizards/operations/UWIZChangeKey_SelectKey.lfm
  12. 3 2
      src/gui-experimental/wizards/operations/UWIZChangeKey_SelectKey.pas
  13. 0 1
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSeller.lfm
  14. 1 0
      src/gui-experimental/wizards/operations/UWIZEnlistAccountForSale_EnterSeller.pas
  15. 13 0
      src/gui-experimental/wizards/operations/UWIZOperation.pas
  16. 10 2
      src/gui-experimental/wizards/operations/UWIZOperationConfirmation.pas
  17. 1 1
      src/gui-experimental/wizards/operations/UWIZOperationFee_Custom.pas
  18. 1 1
      src/gui-experimental/wizards/operations/UWIZOperationPayload_Content.pas
  19. 2 2
      src/gui-experimental/wizards/operations/UWIZOperationSelected.pas
  20. 0 1
      src/gui-experimental/wizards/operations/UWIZOperationSigner_Select.lfm
  21. 1 7
      src/gui-experimental/wizards/operations/UWIZSendPASC_Details.pas
  22. 12 1
      src/pascalcoin_wallet_experimental.lpi

+ 4 - 0
src/gui-experimental/UCTRLWallet.lfm

@@ -185,6 +185,10 @@ object CTRLWallet: TCTRLWallet
         OnClick = miDelistAccountsFromSaleClick
         OnClick = miDelistAccountsFromSaleClick
       end
       end
     end
     end
+    object miBuyAccount: TMenuItem
+      Caption = 'Buy Account'
+      OnClick = miBuyAccountClick
+    end
     object miSep1: TMenuItem
     object miSep1: TMenuItem
       Caption = '-'
       Caption = '-'
     end
     end

+ 8 - 0
src/gui-experimental/UCTRLWallet.pas

@@ -40,6 +40,7 @@ type
     Label2: TLabel;
     Label2: TLabel;
     lblTotalPASA: TLabel;
     lblTotalPASA: TLabel;
     lblTotalPASC: TLabel;
     lblTotalPASC: TLabel;
+    miBuyAccount: TMenuItem;
     miChangeAccountInfo: TMenuItem;
     miChangeAccountInfo: TMenuItem;
     miCopyOphash: TMenuItem;
     miCopyOphash: TMenuItem;
     miOperationInfo: TMenuItem;
     miOperationInfo: TMenuItem;
@@ -64,6 +65,7 @@ type
     procedure FormCreate(Sender: TObject);
     procedure FormCreate(Sender: TObject);
     procedure FormDestroy(Sender: TObject);
     procedure FormDestroy(Sender: TObject);
     procedure FormResize(Sender: TObject);
     procedure FormResize(Sender: TObject);
+    procedure miBuyAccountClick(Sender: TObject);
     procedure miChangeAccountInfoClick(Sender: TObject);
     procedure miChangeAccountInfoClick(Sender: TObject);
     procedure miAccountInfoClick(Sender: TObject);
     procedure miAccountInfoClick(Sender: TObject);
     procedure miChangeKeyClick(Sender: TObject);
     procedure miChangeKeyClick(Sender: TObject);
@@ -617,6 +619,7 @@ var
 begin
 begin
   miSep1.Visible := ASelection.RowCount = 1;
   miSep1.Visible := ASelection.RowCount = 1;
   miAccountInfo.Visible := ASelection.RowCount = 1;
   miAccountInfo.Visible := ASelection.RowCount = 1;
+  miBuyAccount.Visible := ASelection.RowCount = 1;
   miSendPASC.Caption := IIF(ASelection.RowCount = 1, 'Send PASC', 'Send All PASC');
   miSendPASC.Caption := IIF(ASelection.RowCount = 1, 'Send PASC', 'Send All PASC');
   miChangeKey.Caption := IIF(ASelection.RowCount = 1, 'Change Key', 'Change All Key');
   miChangeKey.Caption := IIF(ASelection.RowCount = 1, 'Change Key', 'Change All Key');
   miEnlistAccountsForSale.Caption := IIF(ASelection.RowCount = 1, 'Enlist Account For Sale', 'Enlist All Account For Sale');
   miEnlistAccountsForSale.Caption := IIF(ASelection.RowCount = 1, 'Enlist Account For Sale', 'Enlist All Account For Sale');
@@ -663,6 +666,11 @@ begin
   TUserInterface.ShowChangeAccountInfoDialog(SelectedAccounts);
   TUserInterface.ShowChangeAccountInfoDialog(SelectedAccounts);
 end;
 end;
 
 
+procedure TCTRLWallet.miBuyAccountClick(Sender: TObject);
+begin
+  TUserInterface.ShowBuyAccountDialog(SelectedAccounts);
+end;
+
 procedure TCTRLWallet.OnPrepareOperationsPopupMenu(Sender: TObject; constref ASelection: TVisualGridSelection; out APopupMenu: TPopupMenu);
 procedure TCTRLWallet.OnPrepareOperationsPopupMenu(Sender: TObject; constref ASelection: TVisualGridSelection; out APopupMenu: TPopupMenu);
 begin
 begin
   if (ASelection.RowCount <> 1) or ((ASelection.RowCount = 1) and (FOperationsGrid.SelectedRows[0].__KEY <> variant(nil))) then begin
   if (ASelection.RowCount <> 1) or ((ASelection.RowCount = 1) and (FOperationsGrid.SelectedRows[0].__KEY <> variant(nil))) then begin

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

@@ -3,13 +3,13 @@ object FRMWalletKeys: TFRMWalletKeys
   Height = 477
   Height = 477
   Top = 191
   Top = 191
   Width = 661
   Width = 661
+  ActiveControl = lbWalletKeys
   Caption = 'Wallet Keys'
   Caption = 'Wallet Keys'
   ClientHeight = 477
   ClientHeight = 477
   ClientWidth = 661
   ClientWidth = 661
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnDestroy = FormDestroy
   OnDestroy = FormDestroy
   Position = poOwnerFormCenter
   Position = poOwnerFormCenter
-  LCLVersion = '1.8.4.0'
   Visible = False
   Visible = False
   object lbWalletKeys: TListBox
   object lbWalletKeys: TListBox
     Left = 24
     Left = 24

+ 16 - 1
src/gui-experimental/UUserInterface.pas

@@ -163,6 +163,7 @@ type
       class procedure ShowSellAccountsDialog(const AAccounts : array of Cardinal);
       class procedure ShowSellAccountsDialog(const AAccounts : array of Cardinal);
       class procedure ShowDelistAccountsDialog(const AAccounts : array of Cardinal);
       class procedure ShowDelistAccountsDialog(const AAccounts : array of Cardinal);
       class procedure ShowChangeAccountInfoDialog(const AAccounts : array of Cardinal);
       class procedure ShowChangeAccountInfoDialog(const AAccounts : array of Cardinal);
+      class procedure ShowBuyAccountDialog(const AAccounts : array of Cardinal);
       class procedure ShowAboutBox(parentForm : TForm);
       class procedure ShowAboutBox(parentForm : TForm);
       class procedure ShowOptionsDialog(parentForm: TForm);
       class procedure ShowOptionsDialog(parentForm: TForm);
       class procedure ShowAccountInfoDialog(parentForm: TForm; const account : Cardinal); overload;
       class procedure ShowAccountInfoDialog(parentForm: TForm; const account : Cardinal); overload;
@@ -218,7 +219,7 @@ implementation
 uses
 uses
   UFRMAbout, UFRMNodesIp, UFRMPascalCoinWalletConfig, UFRMPayloadDecoder, UFRMMemoText,
   UFRMAbout, UFRMNodesIp, UFRMPascalCoinWalletConfig, UFRMPayloadDecoder, UFRMMemoText,
   UOpenSSL, UFileStorage, UTime, USettings, UCoreUtils, UMemory,
   UOpenSSL, UFileStorage, UTime, USettings, UCoreUtils, UMemory,
-  UWIZOperation, UWIZSendPASC, UWIZChangeKey, UWIZEnlistAccountForSale, UWIZDelistAccountFromSale, UWIZChangeAccountInfo, UCoreObjects;
+  UWIZOperation, UWIZSendPASC, UWIZChangeKey, UWIZEnlistAccountForSale, UWIZDelistAccountFromSale, UWIZChangeAccountInfo, UWIZBuyAccount, UCoreObjects;
 
 
 {%region UI Lifecyle}
 {%region UI Lifecyle}
 
 
@@ -658,6 +659,20 @@ begin
   wiz.Start(model);
   wiz.Start(model);
 end;
 end;
 
 
+class procedure TUserInterface.ShowBuyAccountDialog(
+  const AAccounts: array of Cardinal);
+var
+  Scoped: TDisposables;
+  wiz: TWIZBuyAccountWizard;
+  model: TWIZOperationsModel;
+begin
+  wiz := Scoped.AddObject(TWIZBuyAccountWizard.Create(nil)) as TWIZBuyAccountWizard;
+  model := TWIZOperationsModel.Create(wiz, omtBuyAccount);
+  model.Account.SelectedAccounts := TNode.Node.GetAccounts(AAccounts, True);
+  model.Account.Count := Length(model.Account.SelectedAccounts);
+  wiz.Start(model);
+end;
+
 class procedure TUserInterface.ShowAboutBox(parentForm : TForm);
 class procedure TUserInterface.ShowAboutBox(parentForm : TForm);
 begin
 begin
   with TFRMAbout.Create(parentForm) do
   with TFRMAbout.Create(parentForm) do

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

@@ -24,7 +24,7 @@ type
 
 
   { TExecuteOperationType }
   { TExecuteOperationType }
 
 
-  TExecuteOperationType = (omtAccount, omtSendPasc, omtChangeKey, omtTransferAccount, omtChangeAccountPrivateKey, omtAddKey, omtEnlistAccountForSale, omtDelistAccountFromSale, omtChangeInfo);
+  TExecuteOperationType = (omtAccount, omtSendPasc, omtChangeKey, omtTransferAccount, omtChangeAccountPrivateKey, omtAddKey, omtEnlistAccountForSale, omtDelistAccountFromSale, omtChangeInfo, omtBuyAccount);
 
 
   { TPayloadEncryptionMode }
   { TPayloadEncryptionMode }
 
 

+ 140 - 30
src/gui-experimental/core.utils/UCoreUtils.pas

@@ -123,6 +123,7 @@ type
     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: TRawBytes; 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;
+    class function ExecuteBuyAccount(const ASelectedAccounts: TArray<TAccount>; const AAccountToBuy: TAccount; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; const AAmount: int64; const ANewOwnerPublicKey: TAccountKey; var AErrorMessage: string): boolean; static;
   end;
   end;
 
 
 
 
@@ -583,7 +584,7 @@ end;
 function TAccountHelper.GetDisplayString: ansistring;
 function TAccountHelper.GetDisplayString: ansistring;
 begin
 begin
   Result := GetAccountString;
   Result := GetAccountString;
-  if Self.Name <> Nil then
+  if Self.Name <> nil then
     Result := Result + ': ' + Self.Name.ToString;
     Result := Result + ': ' + Self.Name.ToString;
 end;
 end;
 
 
@@ -593,7 +594,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 <> Nil, 'Name: ' + Self.Name.ToString, ''), 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 +651,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 <> Nil) 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 <> Nil) 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
@@ -790,14 +791,14 @@ begin
       begin
       begin
         // Use sender public key
         // Use sender public key
         AEncodedPayloadBytes := ECIESEncrypt(ASenderPublicKey, TEncoding.ANSI.GetBytes(APayloadContent));
         AEncodedPayloadBytes := ECIESEncrypt(ASenderPublicKey, TEncoding.ANSI.GetBytes(APayloadContent));
-        LValid := AEncodedPayloadBytes <> Nil;
+        LValid := AEncodedPayloadBytes <> nil;
       end;
       end;
 
 
       pemEncryptWithRecipient:
       pemEncryptWithRecipient:
       begin
       begin
         // With destination public key
         // With destination public key
         AEncodedPayloadBytes := ECIESEncrypt(ADestinationPublicKey, TEncoding.ANSI.GetBytes(APayloadContent));
         AEncodedPayloadBytes := ECIESEncrypt(ADestinationPublicKey, TEncoding.ANSI.GetBytes(APayloadContent));
-        LValid := AEncodedPayloadBytes <> Nil;
+        LValid := AEncodedPayloadBytes <> nil;
       end;
       end;
 
 
       pemEncryptWithPassword:
       pemEncryptWithPassword:
@@ -810,7 +811,7 @@ begin
         end;
         end;
         AEncodedPayloadBytes := TAESComp.EVP_Encrypt_AES256(
         AEncodedPayloadBytes := TAESComp.EVP_Encrypt_AES256(
           TEncoding.ANSI.GetBytes(APayloadContent), TEncoding.ANSI.GetBytes(APayloadEncryptionPassword));
           TEncoding.ANSI.GetBytes(APayloadContent), TEncoding.ANSI.GetBytes(APayloadEncryptionPassword));
-        LValid := AEncodedPayloadBytes <> Nil;
+        LValid := AEncodedPayloadBytes <> nil;
       end;
       end;
 
 
       pemNotEncrypt:
       pemNotEncrypt:
@@ -1097,12 +1098,13 @@ begin
           LFee := AFee
           LFee := AFee
         else
         else
           LFee := LSignerAccount.balance - UInt64(LTotalSignerFee);
           LFee := LSignerAccount.balance - UInt64(LTotalSignerFee);
-        LPCOperation := TOpChangeKeySigned.Create(TNode.Node.Bank.Safebox.CurrentProtocol, LSignerAccount.account,
+
+        LPCOperation := TOpChangeKeySigned.Create(LNode.Bank.Safebox.CurrentProtocol, LSignerAccount.account,
           LSignerAccount.n_operation + LNoOfOperations + 1, LCurrentAccount.account,
           LSignerAccount.n_operation + LNoOfOperations + 1, LCurrentAccount.account,
           LWalletKey.PrivateKey, APublicKey, LFee, LPayloadEncodedBytes);
           LWalletKey.PrivateKey, APublicKey, LFee, LPayloadEncodedBytes);
       end
       end
       else
       else
-        LPCOperation := TOpChangeKey.Create(TNode.Node.Bank.Safebox.CurrentProtocol, LCurrentAccount.account, LCurrentAccount.n_operation +
+        LPCOperation := TOpChangeKey.Create(LNode.Bank.Safebox.CurrentProtocol, LCurrentAccount.account, LCurrentAccount.n_operation +
           1, LCurrentAccount.account, LWalletKey.PrivateKey, APublicKey, LFee, LPayloadEncodedBytes);
           1, LCurrentAccount.account, LWalletKey.PrivateKey, APublicKey, LFee, LPayloadEncodedBytes);
 
 
       try
       try
@@ -1211,29 +1213,29 @@ begin
         Exit(False);
         Exit(False);
       end;
       end;
 
 
+      if LSignerAccount.balance > UInt64(AFee) then
+        LFee := AFee
+      else
+        LFee := LSignerAccount.balance;
+
       if not UpdatePayload(LCurrentAccount.accountInfo.accountKey, LSignerAccount.accountInfo.accountKey, APayloadEncryptionMode, APayloadContent, LPayloadEncodedBytes, APayloadEncryptionPassword, AErrorMessage) then
       if not UpdatePayload(LCurrentAccount.accountInfo.accountKey, LSignerAccount.accountInfo.accountKey, APayloadEncryptionMode, APayloadContent, LPayloadEncodedBytes, APayloadEncryptionPassword, AErrorMessage) then
       begin
       begin
         AErrorMessage := Format('Error Encoding Payload Of Selected Account "%s. ", Specific Error Is "%s"', [LCurrentAccount.AccountString, AErrorMessage]);
         AErrorMessage := Format('Error Encoding Payload Of Selected Account "%s. ", Specific Error Is "%s"', [LCurrentAccount.AccountString, AErrorMessage]);
         Exit(False);
         Exit(False);
       end;
       end;
 
 
-      if LSignerAccount.balance > UInt64(AFee) then
-        LFee := AFee
-      else
-        LFee := LSignerAccount.balance;
-
       case AAccountSaleMode of
       case AAccountSaleMode of
         akaPublicSale:
         akaPublicSale:
 
 
           LPCOperation := TOpListAccountForSale.CreateListAccountForSale(
           LPCOperation := TOpListAccountForSale.CreateListAccountForSale(
-            TNode.Node.Bank.Safebox.CurrentProtocol, LSignerAccount.account, LSignerAccount.n_operation + 1 + LAccountIdx,
+            LNode.Bank.Safebox.CurrentProtocol, LSignerAccount.account, LSignerAccount.n_operation + 1 + LAccountIdx,
             LCurrentAccount.account, ASalePrice, LFee, ASellerAccount.account,
             LCurrentAccount.account, ASalePrice, LFee, ASellerAccount.account,
             APublicKey, 0, LWalletKey.PrivateKey, LPayloadEncodedBytes);
             APublicKey, 0, LWalletKey.PrivateKey, LPayloadEncodedBytes);
 
 
         akaPrivateSale:
         akaPrivateSale:
 
 
           LPCOperation := TOpListAccountForSale.CreateListAccountForSale(
           LPCOperation := TOpListAccountForSale.CreateListAccountForSale(
-            TNode.Node.Bank.Safebox.CurrentProtocol, LSignerAccount.account, LSignerAccount.n_operation + 1 + LAccountIdx,
+            LNode.Bank.Safebox.CurrentProtocol, LSignerAccount.account, LSignerAccount.n_operation + 1 + LAccountIdx,
             LCurrentAccount.account, ASalePrice, LFee, ASellerAccount.account,
             LCurrentAccount.account, ASalePrice, LFee, ASellerAccount.account,
             APublicKey, ALockedUntilBlock, LWalletKey.PrivateKey, LPayloadEncodedBytes)
             APublicKey, ALockedUntilBlock, LWalletKey.PrivateKey, LPayloadEncodedBytes)
         else
         else
@@ -1341,18 +1343,18 @@ begin
         Exit(False);
         Exit(False);
       end;
       end;
 
 
+      if LSignerAccount.balance > UInt64(AFee) then
+        LFee := AFee
+      else
+        LFee := LSignerAccount.balance;
+
       if not UpdatePayload(LCurrentAccount.accountInfo.accountKey, LSignerAccount.accountInfo.accountKey, APayloadEncryptionMode, APayloadContent, LPayloadEncodedBytes, APayloadEncryptionPassword, AErrorMessage) then
       if not UpdatePayload(LCurrentAccount.accountInfo.accountKey, LSignerAccount.accountInfo.accountKey, APayloadEncryptionMode, APayloadContent, LPayloadEncodedBytes, APayloadEncryptionPassword, AErrorMessage) then
       begin
       begin
         AErrorMessage := Format('Error Encoding Payload Of Selected Account "%s. ", Specific Error Is "%s"', [LCurrentAccount.AccountString, AErrorMessage]);
         AErrorMessage := Format('Error Encoding Payload Of Selected Account "%s. ", Specific Error Is "%s"', [LCurrentAccount.AccountString, AErrorMessage]);
         Exit(False);
         Exit(False);
       end;
       end;
 
 
-      if LSignerAccount.balance > UInt64(AFee) then
-        LFee := AFee
-      else
-        LFee := LSignerAccount.balance;
-
-      LPCOperation := TOpDelistAccountForSale.CreateDelistAccountForSale(TNode.Node.Bank.Safebox.CurrentProtocol,
+      LPCOperation := TOpDelistAccountForSale.CreateDelistAccountForSale(LNode.Bank.Safebox.CurrentProtocol,
         LSignerAccount.account, LSignerAccount.n_operation + 1 + LAccountIdx, LCurrentAccount.account, LFee, LWalletKey.PrivateKey,
         LSignerAccount.account, LSignerAccount.n_operation + 1 + LAccountIdx, LCurrentAccount.account, LFee, LWalletKey.PrivateKey,
         LPayloadEncodedBytes);
         LPayloadEncodedBytes);
 
 
@@ -1432,10 +1434,10 @@ begin
 
 
         LNewName := ANewName;
         LNewName := ANewName;
 
 
-        If not TBaseType.Equals(LNewName,LCurrentAccount.name) then
+        if not TBaseType.Equals(LNewName, LCurrentAccount.Name) then
         begin
         begin
           LChangeName := True;
           LChangeName := True;
-          if LNewName <> Nil then
+          if LNewName <> nil then
           begin
           begin
             if (not TPCSafeBox.ValidAccountName(LNewName, AErrorMessage)) then
             if (not TPCSafeBox.ValidAccountName(LNewName, AErrorMessage)) then
             begin
             begin
@@ -1492,19 +1494,19 @@ begin
         Exit(False);
         Exit(False);
       end;
       end;
 
 
+      if LSignerAccount.balance > UInt64(AFee) then
+        LFee := AFee
+      else
+        LFee := LSignerAccount.balance;
+
       if not UpdatePayload(LCurrentAccount.accountInfo.accountKey, LSignerAccount.accountInfo.accountKey, APayloadEncryptionMode, APayloadContent, LPayloadEncodedBytes, APayloadEncryptionPassword, AErrorMessage) then
       if not UpdatePayload(LCurrentAccount.accountInfo.accountKey, LSignerAccount.accountInfo.accountKey, APayloadEncryptionMode, APayloadContent, LPayloadEncodedBytes, APayloadEncryptionPassword, AErrorMessage) then
       begin
       begin
         AErrorMessage := Format('Error Encoding Payload Of Selected Account "%s. ", Specific Error Is "%s"', [LCurrentAccount.AccountString, AErrorMessage]);
         AErrorMessage := Format('Error Encoding Payload Of Selected Account "%s. ", Specific Error Is "%s"', [LCurrentAccount.AccountString, AErrorMessage]);
         Exit(False);
         Exit(False);
       end;
       end;
 
 
-      if LSignerAccount.balance > UInt64(AFee) then
-        LFee := AFee
-      else
-        LFee := LSignerAccount.balance;
-
 
 
-      LPCOperation := TOpChangeAccountInfo.CreateChangeAccountInfo(TNode.Node.Bank.Safebox.CurrentProtocol,
+      LPCOperation := TOpChangeAccountInfo.CreateChangeAccountInfo(LNode.Bank.Safebox.CurrentProtocol,
         LSignerAccount.account, LSignerAccount.n_operation + 1, LCurrentAccount.account, LWalletKey.PrivateKey, False, CT_TECDSA_Public_Nul,
         LSignerAccount.account, LSignerAccount.n_operation + 1, LCurrentAccount.account, LWalletKey.PrivateKey, False, CT_TECDSA_Public_Nul,
         LChangeName, LNewName, LChangeType, ANewType, LFee, LPayloadEncodedBytes);
         LChangeName, LNewName, LChangeType, ANewType, LFee, LPayloadEncodedBytes);
 
 
@@ -1555,6 +1557,114 @@ begin
   end;
   end;
 end;
 end;
 
 
+class function TWIZOperationsHelper.ExecuteBuyAccount(const ASelectedAccounts: TArray<TAccount>; const AAccountToBuy: TAccount; AFee: int64; const APayloadEncryptionMode: TPayloadEncryptionMode; const APayloadContent, APayloadEncryptionPassword: string; const AAmount: int64; const ANewOwnerPublicKey: TAccountKey; var AErrorMessage: string): boolean;
+var
+  LWalletKey: TWalletKey;
+  LWalletKeys: TWalletKeys;
+  LNode: TNode;
+  LPCOperation: TPCOperation;
+  LOperationsHashTree: TOperationsHashTree;
+  LTotalSignerFee, LFee: int64;
+  LOperationsTxt, LOperationToString, LTemp: string;
+  LAccountIdx, LNoOfOperations, LAccNumberIndex: integer;
+  LCurrentAccount, LSignerAccount: TAccount;
+  LPayloadEncodedBytes, LNewName: TRawBytes;
+begin
+
+  LWalletKeys := TWallet.Keys;
+  LNode := TNode.Node;
+
+  if not TWIZOperationsHelper.ValidateOperationsInput(ASelectedAccounts, LWalletKeys, LNode, AErrorMessage) then
+    Exit(False);
+
+  LOperationsHashTree := TOperationsHashTree.Create;
+  try
+    LTotalSignerFee := 0;
+    LNoOfOperations := 0;
+    LOperationsTxt := '';
+    LOperationToString := '';
+    // although buyaccount does not support multioperation for now, this loop was intentionally put here
+    for LAccountIdx := Low(ASelectedAccounts) to High(ASelectedAccounts) do
+    begin
+      LPCOperation := nil; // reset LPCOperation to Nil
+      LCurrentAccount := ASelectedAccounts[LAccountIdx];
+      LSignerAccount := LCurrentAccount;
+
+      if Length(ASelectedAccounts) <> 1 then
+      begin
+        AErrorMessage := 'Cannot Buy Accounts With MultiOperations. Use Only 1 Account';
+        Exit(False);
+      end;
+
+      if (LNode.Bank.SafeBox.CurrentProtocol = CT_PROTOCOL_1) then
+      begin
+        AErrorMessage := 'This Operation Needs PROTOCOL 2 Active';
+        Exit(False);
+      end;
+
+      if not TAccountComp.IsAccountForSale(AAccountToBuy.accountInfo) then
+      begin
+        AErrorMessage := Format('Account "%s" is not enlisted for sale', [AAccountToBuy.AccountString]);
+        Exit(False);
+      end;
+
+      if LSignerAccount.balance > UInt64(AFee) then
+        LFee := AFee
+      else
+        LFee := LSignerAccount.balance;
+
+
+      if ((AAmount + LFee) > LCurrentAccount.balance) then
+      begin
+        AErrorMessage := Format('Insufficient Funds in Account "%s" to buy Account "%s"', [LCurrentAccount.AccountString, AAccountToBuy.AccountString]);
+        Exit(False);
+      end;
+
+      if not UpdatePayload(LCurrentAccount.accountInfo.accountKey, LSignerAccount.accountInfo.accountKey, APayloadEncryptionMode, APayloadContent, LPayloadEncodedBytes, APayloadEncryptionPassword, AErrorMessage) then
+      begin
+        AErrorMessage := Format('Error Encoding Payload Of Selected Account "%s. ", Specific Error Is "%s"', [LCurrentAccount.AccountString, AErrorMessage]);
+        Exit(False);
+      end;
+
+      LPCOperation := TOpBuyAccount.CreateBuy(LNode.Bank.Safebox.CurrentProtocol, LCurrentAccount.account, LCurrentAccount.n_operation + 1, AAccountToBuy.account, AAccountToBuy.accountInfo.account_to_pay,
+        AAccountToBuy.accountInfo.price, AAmount, LFee, ANewOwnerPublicKey, LWalletKey.PrivateKey, LPayloadEncodedBytes);
+
+      try
+      LTemp := Format('%d. Buy Account %s for %s PASC %s', [LNoOfOperations + 1, AAccountToBuy.AccountString, TAccountComp.FormatMoney(AAmount), sLineBreak]);
+
+        if LOperationsTxt <> '' then
+          LOperationsTxt := LOperationsTxt + LTemp + sLineBreak
+        else
+          LOperationsTxt := sLineBreak + LTemp;
+
+        if Assigned(LPCOperation) then
+        begin
+          LOperationsHashTree.AddOperationToHashTree(LPCOperation);
+          Inc(LNoOfOperations);
+          Inc(LTotalSignerFee, LFee);
+          if LOperationToString <> '' then
+            LOperationToString := LOperationToString + #10;
+          LOperationToString := LOperationToString + LPCOperation.ToString;
+        end;
+      finally
+        FreeAndNil(LPCOperation);
+      end;
+
+    end;
+
+    if (LOperationsHashTree.OperationsCount = 0) then
+    begin
+      AErrorMessage := 'No Valid Operation to Execute';
+      Exit(False);
+    end;
+
+    Exit(TWIZOperationsHelper.OthersFinalizeAndDisplayMessage(LOperationsTxt, LOperationToString, LNoOfOperations, LTotalSignerFee, LOperationsHashTree, AErrorMessage));
+
+  finally
+    LOperationsHashTree.Free;
+  end;
+end;
+
 
 
 
 
 end.
 end.

+ 86 - 0
src/gui-experimental/wizards/operations/UWIZBuyAccount.pas

@@ -0,0 +1,86 @@
+unit UWIZBuyAccount;
+
+{ Copyright (c) 2018 by Sphere 10 Software <http://www.sphere10.com/>
+
+  Distributed under the MIT software license, see the accompanying file LICENSE
+  or visit http://www.opensource.org/licenses/mit-license.php.
+
+  This unit is a part of the PascalCoin Project, an infinitely scalable
+  cryptocurrency. Find us here:
+  Web: https://www.pascalcoin.org
+  Source: https://github.com/PascalCoin/PascalCoin
+
+  Acknowledgements:
+  - Ugochukwu Mmaduekwe - main developer
+  - Herman Schoenfeld - designer
+
+  THIS LICENSE HEADER MUST NOT BE REMOVED.
+}
+
+{$mode delphi}
+
+interface
+
+uses
+  Classes, UWizard, UWIZOperation;
+
+type
+
+  { TWIZBuyAccountWizard }
+
+  TWIZBuyAccountWizard = class(TWizard<TWIZOperationsModel>)
+  public
+    constructor Create(AOwner: TComponent); override;
+    function DetermineHasNext: boolean; override;
+    function DetermineHasPrevious: boolean; override;
+    function FinishRequested(out message: ansistring): boolean; override;
+    function CancelRequested(out message: ansistring): boolean; override;
+  end;
+
+implementation
+
+uses
+  UWallet,
+  UCommon,
+  UCoreUtils,
+  UWIZOperationSelected,
+  UWIZBuyAccount_Details,
+  UWIZOperationConfirmation;
+
+{ TWIZBuyAccountWizard }
+
+constructor TWIZBuyAccountWizard.Create(AOwner: TComponent);
+begin
+  inherited Create(AOwner, [
+    TWIZOperationSelected,
+    TWIZBuyAccount_Details,
+    TWIZOperationConfirmation
+    ]);
+  TitleText := 'Buy Account';
+  FinishText := 'Buy Account';
+end;
+
+function TWIZBuyAccountWizard.DetermineHasNext: boolean;
+begin
+  Result := not (CurrentScreen is TWIZOperationConfirmation);
+end;
+
+function TWIZBuyAccountWizard.DetermineHasPrevious: boolean;
+begin
+  Result := inherited DetermineHasPrevious;
+end;
+
+function TWIZBuyAccountWizard.FinishRequested(out message: ansistring): boolean;
+begin
+  // Execute Buy Account here
+  Result := TWIZOperationsHelper.ExecuteBuyAccount(Model.Account.SelectedAccounts, Model.BuyAccount.AccountToBuy, Model.Fee.SingleOperationFee, Model.Payload.PayloadEncryptionMode, IIF(Model.Payload.HasPayload, Model.Payload.Content, ''), Model.Payload.Password, Model.BuyAccount.Amount, Model.BuyAccount.NewOwnerPublicKey, message);
+  if TWIZOperationsModel.RelockOnFinish then
+    TWallet.Keys.LockWallet;
+end;
+
+function TWIZBuyAccountWizard.CancelRequested(out message: ansistring): boolean;
+begin
+  Result := True;
+end;
+
+end.

+ 950 - 0
src/gui-experimental/wizards/operations/UWIZBuyAccount_Details.lfm

@@ -0,0 +1,950 @@
+object WIZBuyAccount_Details: TWIZBuyAccount_Details
+  Left = 0
+  Height = 561
+  Top = 0
+  Width = 450
+  ActiveControl = txtAccountToBuy
+  Anchors = [akTop, akLeft, akBottom]
+  Caption = 'WIZBuyAccount_Details'
+  ClientHeight = 561
+  ClientWidth = 450
+  Visible = False
+  object gbAccountToBuy: TGroupBox
+    Left = 8
+    Height = 124
+    Top = 8
+    Width = 431
+    Anchors = [akTop, akLeft, akRight]
+    Caption = 'Account to Buy'
+    ClientHeight = 104
+    ClientWidth = 427
+    TabOrder = 0
+    object txtAccountToBuy: TEdit
+      Left = 16
+      Height = 56
+      Top = 32
+      Width = 328
+      Alignment = taRightJustify
+      Anchors = [akTop, akLeft, akRight]
+      AutoSize = False
+      Font.Height = -43
+      Font.Style = [fsBold]
+      OnChange = txtAccountToBuyChange
+      ParentFont = False
+      TabOrder = 0
+    end
+    object btnSearch: TSpeedButton
+      Left = 354
+      Height = 56
+      Top = 32
+      Width = 56
+      Anchors = [akTop, akRight]
+      Glyph.Data = {
+        36310000424D3631000000000000360000002800000038000000380000000100
+        2000000000000031000064000000640000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002395F9572293F6CA2293F6E62294F6BA2094
+        F537000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002194F8732294F6FE2294F7FF2294F7FF2294F7FF2294
+        F7F62094F5370000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002093F6742294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F6BA0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002093F6742294F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7E50000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002094
+        F6752294F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2293F6CA0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002292F6762294
+        F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F9590000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002293F6772294F6FE2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194
+        F67A000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000007FFF042192F5362094F6752293F7A22294F6BF2194F6D22193F6DB2294
+        F7D02193F6BE2194F7A02193F6722396FA3300AAFF0300000000000000000000
+        0000000000000000000000000000000000002292F6782294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F6790000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002096F8272193
+        F7912293F6E82294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7E52294F58D2491F7230000
+        00000000000000000000000000002193F6792294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F679000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002394F7242294F6AA2293F6FE2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F6FC2193
+        F69F1D93FE1A000000002193F6792294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F67900000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000003F7FFF042094F67C2194F6F82294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2194F6F12193F7A62294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2193F6790000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002491F2152293F7C02294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2192F67A000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002094F61F2194F6DA2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F67A00000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002190
+        F3172194F6DC2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2194F67A0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002A7FFF062194
+        F7C42294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F6FE2193F7CC2194F7812193F5532391F63A1F91F4312294
+        F63C2395F6572193F5892194F6D52294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194
+        F67A000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002294F7862294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F6FE2294F6AC2195F92E00000000000000000000000000000000000000000000
+        000000000000000000000000FF012292F63B2193F6BD2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F7A60000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002195F32E2193F6FA2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F6ED2195
+        F84D000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002192F7632294F6F62294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194F6F11D93
+        F51A000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002193F6B72294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F7E12193F8260000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002094F5372293
+        F7EE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193
+        F69F000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002192F5362294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194F7EA2394F724000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002094
+        F5372294F6F62294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293
+        F6FC2491F0230000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002293F7A32294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F6FE2093F44700000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002192F7632294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2293F78C0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000178BE70B2294F6F42294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2194F7A00000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002193F6BD2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7E500AAFF0300000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002093F54E2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2293F6FC1F97F7200000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002292F63B2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2396F53300000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002193F58A2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2194F7B6000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000012194F6D52294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2193F67200000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002193F6BC2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2393F56D000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002193F5892294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F7A000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002194F6DC2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF1F91F538000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002392F6572294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F6BD00000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002293F6F02294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2491F51C000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002292FA3B2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F6D000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000FFFF012194F6FB2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF1E96FF11000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000001F94F9302294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2193F6DB00000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000FF012193F6F22294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF1D93F51A000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002393F6392294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F6D200000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002293F6DF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2293F534000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002193F5532294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F6BF00000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002293F7C12294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2094F765000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002194F7812294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2293F7A200000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002194F7902294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2193F7AD000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002193F6CC2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2094F67500000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002193F6552294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2194F6F82190F3170000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002195F92E2294F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2192F53600000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000001E96F0112193F6F92294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2194F68F0000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002294F6AC2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2293F6E8007FFF0400000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002193F6AF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2193F6FB2293FA3400000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002195F84D2294F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2193F7910000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002294F7432294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F6DE2296F316000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002193
+        F8262293F6ED2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293
+        F6FE2096F8270000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002193F6C72294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F6D12296F3160000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002290F1252194
+        F7E12294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7AA000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002294F63C2294F6FD2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F6DE2293
+        FA34000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002093F4472193F6EB2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194F6F82394
+        F724000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002193F69A2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193
+        F7FA2194F68F2190F31700000000000000000000000000000000000000000000
+        00000000000000000000000000001F97F7202194F7A02294F6FE2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2094F67C0000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002789EB0D2193
+        F6D62294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F6F82193F7AD2092F7652396FA331D93F51A1E96F0112491
+        F51C1F91F5382393F56D2194F7B62293F6FC2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F7C0007FFF040000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002394
+        F7242194F7EA2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194F7DA2491F215000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002092F42F2194F7EA2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2194F6DC2094F61F00000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002394F7242193F6D62294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2194F7C42190F3170000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002789EB0D2193F69A2294F6FD2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2193F6FA2294F7862A7FFF06000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002294F63C2193F6C72294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193
+        F6B72195F32E0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002294F7432193
+        F6AF2193F6F92294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F6F42293F7A22195FA350000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00001F9FFF102193F6552194F7902293F7C12293F6DF2193F6F22194F6FB2293
+        F6F02194F6DC2193F6BC2193F58A2195F84D178BE70B00000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000000000FF0100FFFF010000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000
+      }
+      OnClick = btnSearchClick
+    end
+    object lblAccountToBuyNotice: TLabel
+      Left = 16
+      Height = 15
+      Top = 8
+      Width = 166
+      Caption = 'Please enter the account to buy'
+      ParentColor = False
+      ParentFont = False
+    end
+    object lblAccountToBuyDetails: TLabel
+      Left = 320
+      Height = 15
+      Top = 8
+      Width = 87
+      Anchors = [akTop, akRight]
+      Caption = 'Account Details'
+      Font.Style = [fsBold]
+      ParentColor = False
+      ParentFont = False
+    end
+  end
+  object gpAmount: TGroupBox
+    Left = 8
+    Height = 122
+    Top = 144
+    Width = 431
+    Anchors = [akTop, akLeft, akRight]
+    Caption = 'Amount'
+    ClientHeight = 102
+    ClientWidth = 427
+    ParentFont = False
+    TabOrder = 1
+    object txtAmount: TEdit
+      Left = 16
+      Height = 56
+      Top = 32
+      Width = 394
+      Alignment = taRightJustify
+      Anchors = [akTop, akLeft, akRight]
+      AutoSize = False
+      Font.Height = -43
+      Font.Style = [fsBold]
+      ParentFont = False
+      TabOrder = 0
+    end
+    object lblAmountNotice: TLabel
+      Left = 16
+      Height = 15
+      Top = 11
+      Width = 259
+      Caption = 'Excessive amount will remain on bought account'
+      ParentColor = False
+    end
+  end
+  object gpOptions: TGroupBox
+    Left = 8
+    Height = 122
+    Top = 416
+    Width = 431
+    Anchors = [akTop, akLeft, akRight]
+    Caption = 'Options'
+    ClientHeight = 102
+    ClientWidth = 427
+    TabOrder = 2
+    object chkCustomFee: TCheckBox
+      Left = 16
+      Height = 19
+      Top = 8
+      Width = 164
+      Caption = 'Allow me to choose the fee'
+      TabOrder = 0
+    end
+    object chkPayload: TCheckBox
+      Left = 16
+      Height = 19
+      Top = 40
+      Width = 158
+      Caption = 'Attach a message payload'
+      TabOrder = 1
+    end
+  end
+  object gbNewPrivateKey: TGroupBox
+    Left = 8
+    Height = 122
+    Top = 280
+    Width = 431
+    Anchors = [akTop, akLeft, akRight, akBottom]
+    AutoSize = True
+    Caption = 'New Private Key'
+    ClientHeight = 102
+    ClientWidth = 427
+    TabOrder = 3
+    object btnGetNewKey: TSpeedButton
+      Left = 354
+      Height = 56
+      Top = 22
+      Width = 56
+      Anchors = [akTop, akRight, akBottom]
+      Glyph.Data = {
+        36310000424D3631000000000000360000002800000038000000380000000100
+        2000000000000031000064000000640000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002395F9572293F6CA2293F6E62294F6BA2094
+        F537000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002194F8732294F6FE2294F7FF2294F7FF2294F7FF2294
+        F7F62094F5370000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002093F6742294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F6BA0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002093F6742294F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7E50000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002094
+        F6752294F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2293F6CA0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002292F6762294
+        F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F9590000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002293F6772294F6FE2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194
+        F67A000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000007FFF042192F5362094F6752293F7A22294F6BF2194F6D22193F6DB2294
+        F7D02193F6BE2194F7A02193F6722396FA3300AAFF0300000000000000000000
+        0000000000000000000000000000000000002292F6782294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F6790000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002096F8272193
+        F7912293F6E82294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7E52294F58D2491F7230000
+        00000000000000000000000000002193F6792294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F679000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002394F7242294F6AA2293F6FE2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F6FC2193
+        F69F1D93FE1A000000002193F6792294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F67900000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000003F7FFF042094F67C2194F6F82294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2194F6F12193F7A62294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2193F6790000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002491F2152293F7C02294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2192F67A000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002094F61F2194F6DA2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F67A00000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002190
+        F3172194F6DC2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2194F67A0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002A7FFF062194
+        F7C42294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F6FE2193F7CC2194F7812193F5532391F63A1F91F4312294
+        F63C2395F6572193F5892194F6D52294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194
+        F67A000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002294F7862294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F6FE2294F6AC2195F92E00000000000000000000000000000000000000000000
+        000000000000000000000000FF012292F63B2193F6BD2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F7A60000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002195F32E2193F6FA2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F6ED2195
+        F84D000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002192F7632294F6F62294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194F6F11D93
+        F51A000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002193F6B72294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193F7E12193F8260000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002094F5372293
+        F7EE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193
+        F69F000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002192F5362294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194F7EA2394F724000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002094
+        F5372294F6F62294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293
+        F6FC2491F0230000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002293F7A32294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F6FE2093F44700000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002192F7632294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2293F78C0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000178BE70B2294F6F42294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2194F7A00000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002193F6BD2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7E500AAFF0300000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002093F54E2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2293F6FC1F97F7200000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002292F63B2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2396F53300000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002193F58A2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2194F7B6000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000012194F6D52294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2193F67200000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002193F6BC2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2393F56D000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002193F5892294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F7A000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002194F6DC2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF1F91F538000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002392F6572294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F6BD00000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002293F6F02294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2491F51C000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002292FA3B2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F6D000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000FFFF012194F6FB2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF1E96FF11000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000001F94F9302294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2193F6DB00000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000FF012193F6F22294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF1D93F51A000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002393F6392294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F6D200000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002293F6DF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2293F534000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002193F5532294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F6BF00000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002293F7C12294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2094F765000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002194F7812294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2293F7A200000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002194F7902294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2193F7AD000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002193F6CC2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2094F67500000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000002193F6552294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2194F6F82190F3170000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002195F92E2294F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2192F53600000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000001E96F0112193F6F92294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2194F68F0000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002294F6AC2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2293F6E8007FFF0400000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002193F6AF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2193F6FB2293FA3400000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002195F84D2294F6FE2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2193F7910000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002294F7432294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F6DE2296F316000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002193
+        F8262293F6ED2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293
+        F6FE2096F8270000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002193F6C72294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F6D12296F3160000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002290F1252194
+        F7E12294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7AA000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002294F63C2294F6FD2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F6DE2293
+        FA34000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000002093F4472193F6EB2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194F6F82394
+        F724000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002193F69A2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193
+        F7FA2194F68F2190F31700000000000000000000000000000000000000000000
+        00000000000000000000000000001F97F7202194F7A02294F6FE2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2094F67C0000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002789EB0D2193
+        F6D62294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2194F6F82193F7AD2092F7652396FA331D93F51A1E96F0112491
+        F51C1F91F5382393F56D2194F7B62293F6FC2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F7C0007FFF040000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000002394
+        F7242194F7EA2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2194F7DA2491F215000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00002092F42F2194F7EA2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2194F6DC2094F61F00000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000002394F7242193F6D62294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2194F7C42190F3170000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000002789EB0D2193F69A2294F6FD2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2193F6FA2294F7862A7FFF06000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000002294F63C2193F6C72294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2193
+        F6B72195F32E0000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00000000000000000000000000000000000000000000000000002294F7432193
+        F6AF2193F6F92294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294F7FF2294
+        F7FF2294F7FF2294F7FF2294F7FF2294F7FF2293F6F42293F7A22195FA350000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        00001F9FFF102193F6552194F7902293F7C12293F6DF2193F6F22194F6FB2293
+        F6F02194F6DC2193F6BC2193F58A2195F84D178BE70B00000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        000000000000000000000000000000000000000000000000FF0100FFFF010000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000000000000000
+        0000000000000000000000000000000000000000000000000000
+      }
+      OnClick = btnGetNewKeyClick
+    end
+    object cbPrivateKeys: TComboBox
+      Left = 16
+      Height = 23
+      Top = 22
+      Width = 328
+      Anchors = [akTop, akLeft, akRight, akBottom]
+      AutoSize = False
+      Font.Height = -35
+      ItemHeight = 47
+      ParentFont = False
+      TabOrder = 0
+      Text = 'Select Private Key'
+    end
+  end
+end

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

@@ -0,0 +1,286 @@
+unit UWIZBuyAccount_Details;
+
+{ Copyright (c) 2018 by Sphere 10 Software <http://www.sphere10.com/>
+
+  Distributed under the MIT software license, see the accompanying file LICENSE
+  or visit http://www.opensource.org/licenses/mit-license.php.
+
+  This unit is a part of the PascalCoin Project, an infinitely scalable
+  cryptocurrency. Find us here:
+  Web: https://www.pascalcoin.org
+  Source: https://github.com/PascalCoin/PascalCoin
+
+  Acknowledgements:
+  - Ugochukwu Mmaduekwe - main developer
+  - Herman Schoenfeld - designer
+
+  THIS LICENSE HEADER MUST NOT BE REMOVED.
+}
+
+{$mode delphi}
+{$modeswitch nestedprocvars}
+
+interface
+
+uses
+  Classes, SysUtils, Forms, Dialogs, Controls, StdCtrls, ExtCtrls, Buttons, UWizard, UWIZOperation;
+
+type
+
+  { TWIZBuyAccount_Details }
+
+  TWIZBuyAccount_Details = class(TWizardForm<TWIZOperationsModel>)
+    btnGetNewKey: TSpeedButton;
+    chkPayload: TCheckBox;
+    chkCustomFee: TCheckBox;
+    cbPrivateKeys: TComboBox;
+    gbNewPrivateKey: TGroupBox;
+    txtAmount: TEdit;
+    txtAccountToBuy: TEdit;
+    gbAccountToBuy: TGroupBox;
+    gpAmount: TGroupBox;
+    gpOptions: TGroupBox;
+    lblAccountToBuyDetails: TLabel;
+    lblAccountToBuyNotice: TLabel;
+    btnSearch: TSpeedButton;
+    lblAmountNotice: TLabel;
+    procedure btnGetNewKeyClick(Sender: TObject);
+    procedure btnSearchClick(Sender: TObject);
+    procedure txtAccountToBuyChange(Sender: TObject);
+    procedure UpdateUI();
+
+  private
+    procedure UpdateWalletKeys();
+
+  public
+    procedure OnPresent; override;
+    procedure OnNext; override;
+    function Validate(out message: ansistring): boolean; override;
+  end;
+
+
+implementation
+
+{$R *.lfm}
+
+uses
+  UNode,
+  UWallet,
+  UCommon,
+  UCrypto,
+  UMemory,
+  UAccounts,
+  USettings,
+  UCoreUtils,
+  UBaseTypes,
+  UCoreObjects,
+  UFRMWalletKeys,
+  UFRMAccountSelect,
+  UCommon.Collections,
+  Generics.Collections,
+  UWIZOperationFee_Custom,
+  UWIZOperationPayload_Encryption;
+
+{ TWIZBuyAccount_Details }
+
+procedure TWIZBuyAccount_Details.txtAccountToBuyChange(Sender: TObject);
+begin
+  UpdateUI();
+end;
+
+procedure TWIZBuyAccount_Details.OnPresent;
+begin
+  UpdateUI();
+
+  UpdateWalletKeys();
+  if TWallet.Keys.Count = 1 then
+    cbPrivateKeys.ItemIndex := 1
+  else
+    cbPrivateKeys.ItemIndex := Model.BuyAccount.SelectedIndex;
+  cbPrivateKeys.SetFocus;
+
+  if Model.Account.Count > 1 then
+  begin
+    chkCustomFee.Checked := True;
+    chkCustomFee.Enabled := False;
+  end;
+
+  // Account To Buy section
+  txtAccountToBuy.SetFocus;
+  txtAccountToBuy.Tag := CT_AS_OnlyForSale;
+
+end;
+
+procedure TWIZBuyAccount_Details.UpdateUI();
+var
+  LTempAccount: TAccount;
+  LAccountNumber: cardinal;
+begin
+  // Account To Buy section
+  if TAccountComp.AccountTxtNumberToAccountNumber(txtAccountToBuy.Text, LAccountNumber) then
+    if ((LAccountNumber < 0) or (LAccountNumber >= TNode.Node.Bank.AccountsCount)) then
+      lblAccountToBuyDetails.Caption := ''
+    else
+    begin
+      LTempAccount := TNode.Node.Operations.SafeBoxTransaction.account(LAccountNumber);
+      lblAccountToBuyDetails.Caption := LTempAccount.Name.ToPrintable;
+    end;
+end;
+
+procedure TWIZBuyAccount_Details.UpdateWalletKeys();
+var
+  LIdx: integer;
+  LWalletKey: TWalletKey;
+  LBuilder: string;
+begin
+  cbPrivateKeys.items.BeginUpdate;
+  try
+    cbPrivateKeys.Items.Clear;
+    cbPrivateKeys.Items.Add('Select Private Key');
+    if not Assigned(TWallet.Keys) then
+      Exit;
+    for LIdx := 0 to TWallet.Keys.Count - 1 do
+    begin
+      LWalletKey := TWallet.Keys.Key[LIdx];
+      LBuilder := IIF(LWalletKey.Name = '', TCrypto.ToHexaString(TAccountComp.AccountKey2RawString(LWalletKey.AccountKey)), LWalletKey.Name);
+      if not Assigned(LWalletKey.PrivateKey) then
+        LBuilder := LBuilder + '(*)';
+      cbPrivateKeys.Items.AddObject(LBuilder, TObject(LIdx));
+    end;
+  finally
+    cbPrivateKeys.Items.EndUpdate;
+  end;
+end;
+
+procedure TWIZBuyAccount_Details.OnNext;
+var
+  LAccountNumber: cardinal;
+  LAccount: TAccount;
+  LWizStepsToInject: TList<TComponentClass>;
+  LDisposables: TDisposables;
+begin
+  LWizStepsToInject := LDisposables.AddObject(TList<TComponentClass>.Create) as TList<TComponentClass>;
+
+  // Account To Buy section
+  TAccountComp.AccountTxtNumberToAccountNumber(txtAccountToBuy.Text, LAccountNumber);
+  Model.BuyAccount.AccountToBuy := TNode.Node.Operations.SafeBoxTransaction.account(LAccountNumber);
+
+  // Fee Section
+  Model.Fee.SingleOperationFee := TSettings.DefaultFee;
+  if chkCustomFee.Checked then
+    LWizStepsToInject.Add(TWIZOperationFee_Custom);
+
+  // Payload Section
+  Model.Payload.HasPayload := IIF(chkPayload.Checked, True, False);
+  if Model.Payload.HasPayload then
+    LWizStepsToInject.Add(TWIZOperationPayload_Encryption);
+
+  // Update wizard flow if applicable
+  if LWizStepsToInject.Count > 0 then
+    UpdatePath(ptInject, LWizStepsToInject.ToArray);
+
+  Model.BuyAccount.SelectedIndex := cbPrivateKeys.ItemIndex;
+end;
+
+function TWIZBuyAccount_Details.Validate(out message: ansistring): boolean;
+var
+  LAccountNumbersWithChecksum: TArray<string>;
+  LAccountNumber: cardinal;
+  LAmount: int64;
+  LIdx: integer;
+  LAccountToBuy: TAccount;
+begin
+  Result := True;
+  // Buy Account section
+  if not (TAccountComp.AccountTxtNumberToAccountNumber(txtAccountToBuy.Text, LAccountNumber)) then
+  begin
+    message := Format('Invalid account "%s"', [txtAccountToBuy.Text]);
+    Exit(False);
+  end;
+
+  if (LAccountNumber < 0) or (LAccountNumber >= TNode.Node.Bank.AccountsCount) or (LAccountNumber = Model.Account.SelectedAccounts[0].account) then
+  begin
+    message := Format('Invalid account to buy "%s"', [TAccountComp.AccountNumberToAccountTxtNumber(LAccountNumber)]);
+    Exit(False);
+  end;
+
+  LAccountToBuy := TNode.Node.Operations.SafeBoxTransaction.Account(LAccountNumber);
+
+  if not TAccountComp.IsAccountForSale(LAccountToBuy.accountInfo) then
+  begin
+    message := Format('Account "%s" is not enlisted for sale', [LAccountToBuy.AccountString]);
+    Exit(False);
+  end;
+
+  if not TAccountComp.TxtToMoney(txtAmount.Text, LAmount) then
+  begin
+    message := 'Invalid Amount Value';
+    Exit(False);
+  end;
+
+  if (LAccountToBuy.accountInfo.price > LAmount) then
+  begin
+    message := Format('Account Price is "%s"', [TAccountComp.FormatMoney(LAccountToBuy.accountInfo.price)]);
+    Exit(False);
+  end;
+
+  if ((LAmount + TSettings.DefaultFee) > Model.Account.SelectedAccounts[0].balance) then
+  begin
+    message := Format('Insufficient Funds in Account "%s" to buy Account "%s"', [Model.Account.SelectedAccounts[0].AccountString, LAccountToBuy.AccountString]);
+    Exit(False);
+  end;
+
+  if cbPrivateKeys.ItemIndex < 1 then
+  begin
+    message := 'Please select a Private Key';
+    Exit(False);
+  end;
+
+  LIdx := PtrInt(cbPrivateKeys.Items.Objects[cbPrivateKeys.ItemIndex]);
+  if (LIdx < 0) or (LIdx >= TWallet.Keys.Count) then
+  begin
+    message := 'Invalid Selected Key';
+    Exit(False);
+  end;
+  Model.BuyAccount.NewOwnerPublicKey := TWallet.Keys.Key[LIdx].AccountKey;
+  Model.BuyAccount.Amount := LAmount;
+
+end;
+
+procedure TWIZBuyAccount_Details.btnSearchClick(Sender: TObject);
+var
+  LFRMAccountSelect: TFRMAccountSelect;
+  LAccountNumber: cardinal;
+begin
+  LFRMAccountSelect := TFRMAccountSelect.Create(Self);
+  LFRMAccountSelect.Position := poMainFormCenter;
+  try
+    LFRMAccountSelect.Node := TNode.Node;
+    LFRMAccountSelect.WalletKeys := TWallet.Keys;
+    LFRMAccountSelect.Filters := txtAccountToBuy.Tag;
+    if TAccountComp.AccountTxtNumberToAccountNumber(txtAccountToBuy.Text, LAccountNumber) then
+      LFRMAccountSelect.DefaultAccount := LAccountNumber;
+    LFRMAccountSelect.AllowSelect := True;
+    if LFRMAccountSelect.ShowModal = mrOk then
+      txtAccountToBuy.Text := TAccountComp.AccountNumberToAccountTxtNumber(LFRMAccountSelect.GetSelected);
+  finally
+    LFRMAccountSelect.Free;
+  end;
+end;
+
+procedure TWIZBuyAccount_Details.btnGetNewKeyClick(Sender: TObject);
+var
+  LFRMWalletKeys: TFRMWalletKeys;
+begin
+  LFRMWalletKeys := TFRMWalletKeys.Create(Self);
+  LFRMWalletKeys.Position := poMainFormCenter;
+  try
+    LFRMWalletKeys.ShowModal;
+    cbPrivateKeys.SetFocus;
+    UpdateWalletKeys;
+  finally
+    LFRMWalletKeys.Free;
+  end;
+end;
+
+end.

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

@@ -8,7 +8,6 @@ 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

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

@@ -7,7 +7,6 @@ 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 - 2
src/gui-experimental/wizards/operations/UWIZChangeKey_SelectKey.pas

@@ -104,7 +104,6 @@ begin
         LBuilder := LBuilder + '(*)';
         LBuilder := LBuilder + '(*)';
       cbNewPrivateKey.Items.AddObject(LBuilder, TObject(LIdx));
       cbNewPrivateKey.Items.AddObject(LBuilder, TObject(LIdx));
     end;
     end;
-    cbNewPrivateKey.Sorted := True;
   finally
   finally
     cbNewPrivateKey.Items.EndUpdate;
     cbNewPrivateKey.Items.EndUpdate;
   end;
   end;
@@ -118,12 +117,14 @@ begin
   else
   else
     cbNewPrivateKey.ItemIndex := Model.ChangeAccountPrivateKey.SelectedIndex;
     cbNewPrivateKey.ItemIndex := Model.ChangeAccountPrivateKey.SelectedIndex;
   cbNewPrivateKeyChange(Self);
   cbNewPrivateKeyChange(Self);
+  cbNewPrivateKey.SetFocus;
+
   if Model.Account.Count > 1 then
   if Model.Account.Count > 1 then
   begin
   begin
     chkChooseFee.Checked := True;
     chkChooseFee.Checked := True;
     chkChooseFee.Enabled := False;
     chkChooseFee.Enabled := False;
   end;
   end;
-  cbNewPrivateKey.SetFocus;
+
 end;
 end;
 
 
 procedure TWIZChangeKey_SelectKey.OnNext;
 procedure TWIZChangeKey_SelectKey.OnNext;

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

@@ -7,7 +7,6 @@ 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

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

@@ -83,6 +83,7 @@ procedure TWIZEnlistAccountForSale_EnterSeller.OnPresent;
 begin
 begin
   UpdateUI();
   UpdateUI();
   edtBeneficiaryAcc.SetFocus;
   edtBeneficiaryAcc.SetFocus;
+  edtBeneficiaryAcc.Tag := CT_AS_MyAccounts;
 end;
 end;
 
 
 procedure TWIZEnlistAccountForSale_EnterSeller.btnSearchClick(Sender: TObject);
 procedure TWIZEnlistAccountForSale_EnterSeller.btnSearchClick(Sender: TObject);

+ 13 - 0
src/gui-experimental/wizards/operations/UWIZOperation.pas

@@ -121,6 +121,16 @@ type
         NewType: Word;
         NewType: Word;
       end;
       end;
 
 
+      { TBuyAccountModel }
+
+      TBuyAccountModel = class(TComponent)
+      public
+        AccountToBuy: TAccount;
+        Amount: Int64;
+        NewOwnerPublicKey: TAccountKey;
+        SelectedIndex: integer;
+      end;
+
     private
     private
       FExecuteOperationType: TExecuteOperationType;
       FExecuteOperationType: TExecuteOperationType;
       FRelockOnFinish: Boolean; static;
       FRelockOnFinish: Boolean; static;
@@ -134,6 +144,7 @@ type
       FSigner: TSignerModel;
       FSigner: TSignerModel;
       FPayload: TPayloadModel;
       FPayload: TPayloadModel;
       FChangeAccountInfo: TChangeAccountInfoModel;
       FChangeAccountInfo: TChangeAccountInfoModel;
+      FBuyAccount: TBuyAccountModel;
     public
     public
       constructor Create(AOwner: TComponent; AType: TExecuteOperationType); overload;
       constructor Create(AOwner: TComponent; AType: TExecuteOperationType); overload;
       property ExecuteOperationType: TExecuteOperationType read FExecuteOperationType;
       property ExecuteOperationType: TExecuteOperationType read FExecuteOperationType;
@@ -147,6 +158,7 @@ type
       property Signer: TSignerModel read FSigner;
       property Signer: TSignerModel read FSigner;
       property Payload: TPayloadModel read FPayload;
       property Payload: TPayloadModel read FPayload;
       property ChangeAccountInfo: TChangeAccountInfoModel read FChangeAccountInfo;
       property ChangeAccountInfo: TChangeAccountInfoModel read FChangeAccountInfo;
+      property BuyAccount: TBuyAccountModel read FBuyAccount;
       class property RelockOnFinish: Boolean read FRelockOnFinish write FRelockOnFinish;
       class property RelockOnFinish: Boolean read FRelockOnFinish write FRelockOnFinish;
   end;
   end;
 
 
@@ -169,6 +181,7 @@ begin
   FSigner := TSignerModel.Create(Self);
   FSigner := TSignerModel.Create(Self);
   FPayload := TPayloadModel.Create(Self);
   FPayload := TPayloadModel.Create(Self);
   FChangeAccountInfo := TChangeAccountInfoModel.Create(Self);
   FChangeAccountInfo := TChangeAccountInfoModel.Create(Self);
+  FBuyAccount := TBuyAccountModel.Create(Self);
 end;
 end;
 
 
 end.
 end.

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

@@ -249,6 +249,8 @@ begin
         Result := Format('%s', [TCoreTool.GetOperationShortText(CT_Op_DelistAccount, CT_OpSubtype_DelistAccount)]);
         Result := Format('%s', [TCoreTool.GetOperationShortText(CT_Op_DelistAccount, CT_OpSubtype_DelistAccount)]);
       omtChangeInfo:
       omtChangeInfo:
         Result := Format('%s', [TCoreTool.GetOperationShortText(CT_Op_ChangeAccountInfo, CT_OpSubtype_ChangeAccountInfo)]);
         Result := Format('%s', [TCoreTool.GetOperationShortText(CT_Op_ChangeAccountInfo, CT_OpSubtype_ChangeAccountInfo)]);
+      omtBuyAccount:
+        Result := Format('%s', [TCoreTool.GetOperationShortText(CT_Op_BuyAccount, CT_OpSubtype_BuyAccountBuyer)]);
 
 
     end
     end
   else if ABindingName = 'Recipient' then
   else if ABindingName = 'Recipient' then
@@ -285,12 +287,18 @@ begin
         Result := TCellRenderers.OperationShortHash(Result);
         Result := TCellRenderers.OperationShortHash(Result);
       end;
       end;
       omtDelistAccountFromSale, omtChangeInfo:
       omtDelistAccountFromSale, omtChangeInfo:
+      begin
         Result := '';
         Result := '';
-
+      end;
+      omtBuyAccount:
+      begin
+        Result := TAccountComp.AccountPublicKeyExport(Model.BuyAccount.NewOwnerPublicKey);
+        Result := TCellRenderers.OperationShortHash(Result);
+      end
     end
     end
   else if ABindingName = 'Signer' then
   else if ABindingName = 'Signer' then
     case Model.ExecuteOperationType of
     case Model.ExecuteOperationType of
-      omtSendPasc:
+      omtSendPasc, omtBuyAccount:
       begin
       begin
         Result := inherited GetItemField(AItem, 'Account');
         Result := inherited GetItemField(AItem, 'Account');
       end;
       end;

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

@@ -98,7 +98,7 @@ begin
   else
   else
   begin
   begin
     case Model.ExecuteOperationType of
     case Model.ExecuteOperationType of
-      omtSendPasc:
+      omtSendPasc, omtBuyAccount:
       begin
       begin
         // do nothing
         // do nothing
       end;
       end;

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

@@ -62,7 +62,7 @@ begin
   Model.Payload.Content := mmoPayload.Lines.Text;
   Model.Payload.Content := mmoPayload.Lines.Text;
 
 
   case Model.ExecuteOperationType of
   case Model.ExecuteOperationType of
-    omtSendPasc:
+    omtSendPasc, omtBuyAccount:
     begin
     begin
       // do nothing
       // do nothing
     end;
     end;

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

@@ -144,11 +144,11 @@ begin
 
 
   case Model.ExecuteOperationType of
   case Model.ExecuteOperationType of
 
 
-    omtSendPasc:
+    omtSendPasc, omtBuyAccount:
     begin
     begin
         if not (TCoreTool.AreAccountBalancesGreaterThan(Model.Account.SelectedAccounts, 0, LAccount)) then
         if not (TCoreTool.AreAccountBalancesGreaterThan(Model.Account.SelectedAccounts, 0, LAccount)) then
         begin
         begin
-          message := Format('Account %s has zero balance so it cannot be part of a send operation.', [LAccount.AccountString]);
+          message := Format('Account %s has zero balance so it cannot be part of this type of operation.', [LAccount.AccountString]);
           Exit(False);
           Exit(False);
         end;
         end;
     end;
     end;

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

@@ -7,7 +7,6 @@ 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 - 7
src/gui-experimental/wizards/operations/UWIZSendPASC_Details.pas

@@ -47,6 +47,7 @@ type
     procedure txtRecipientChange(Sender: TObject);
     procedure txtRecipientChange(Sender: TObject);
     procedure UpdateUI();
     procedure UpdateUI();
 
 
+
   public
   public
     procedure OnPresent; override;
     procedure OnPresent; override;
     procedure OnNext; override;
     procedure OnNext; override;
@@ -161,13 +162,6 @@ begin
   if Model.Payload.HasPayload then
   if Model.Payload.HasPayload then
     LWizStepsToInject.Add(TWIZOperationPayload_Encryption);
     LWizStepsToInject.Add(TWIZOperationPayload_Encryption);
 
 
-  // Signer section
-  if Model.Account.Count = 1 then
-  begin
-    Model.Signer.SignerAccount := Model.Account.SelectedAccounts[0];
-    Model.Signer.OperationSigningMode := akaPrimary;
-  end;
-
   // Update wizard flow if applicable
   // Update wizard flow if applicable
   if LWizStepsToInject.Count > 0 then
   if LWizStepsToInject.Count > 0 then
     UpdatePath(ptInject, LWizStepsToInject.ToArray);
     UpdatePath(ptInject, LWizStepsToInject.ToArray);

+ 12 - 1
src/pascalcoin_wallet_experimental.lpi

@@ -82,7 +82,7 @@
         <PackageName Value="LCL"/>
         <PackageName Value="LCL"/>
       </Item1>
       </Item1>
     </RequiredPackages>
     </RequiredPackages>
-    <Units Count="102">
+    <Units Count="104">
       <Unit0>
       <Unit0>
         <Filename Value="pascalcoin_wallet_experimental.dpr"/>
         <Filename Value="pascalcoin_wallet_experimental.dpr"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
@@ -636,6 +636,17 @@
         <HasResources Value="True"/>
         <HasResources Value="True"/>
         <ResourceBaseClass Value="Form"/>
         <ResourceBaseClass Value="Form"/>
       </Unit101>
       </Unit101>
+      <Unit102>
+        <Filename Value="gui-experimental\wizards\operations\UWIZBuyAccount.pas"/>
+        <IsPartOfProject Value="True"/>
+      </Unit102>
+      <Unit103>
+        <Filename Value="gui-experimental\wizards\operations\UWIZBuyAccount_Details.pas"/>
+        <IsPartOfProject Value="True"/>
+        <ComponentName Value="WIZBuyAccount_Details"/>
+        <HasResources Value="True"/>
+        <ResourceBaseClass Value="Form"/>
+      </Unit103>
     </Units>
     </Units>
   </ProjectOptions>
   </ProjectOptions>
   <CompilerOptions>
   <CompilerOptions>