Browse Source

some more refactoring with respect to new models.

Ugochukwu Mmaduekwe 7 years ago
parent
commit
b2c4007ef7

+ 0 - 2
src/gui/wizards/UWIZModels.pas

@@ -62,14 +62,12 @@ type
     public
     public
       SingleAmountToSend: int64;
       SingleAmountToSend: int64;
       DestinationAccount: TAccount;
       DestinationAccount: TAccount;
-      // SelectedAccounts: TArray<TAccount>;
     end;
     end;
 
 
     { TChangeKeyModel }
     { TChangeKeyModel }
 
 
     TChangeKeyModel = class(TComponent)
     TChangeKeyModel = class(TComponent)
     public
     public
-      // SelectedAccounts: TArray<TAccount>;
       ChangeKeyMode: TChangeKeyMode;
       ChangeKeyMode: TChangeKeyMode;
     end;
     end;
 
 

+ 11 - 11
src/gui/wizards/operations/UWIZChangeKey.pas

@@ -165,7 +165,7 @@ begin
     Exit;
     Exit;
   end;
   end;
 
 
-  if Length(Model.ChangeKey.SelectedAccounts) = 0 then
+  if Length(Model.Account.SelectedAccounts) = 0 then
   begin
   begin
     errors := 'No sender account';
     errors := 'No sender account';
     Exit;
     Exit;
@@ -173,9 +173,9 @@ begin
   else
   else
   begin
   begin
 
 
-    for iAcc := Low(Model.ChangeKey.SelectedAccounts) to High(Model.ChangeKey.SelectedAccounts) do
+    for iAcc := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
     begin
     begin
-      sender_account := Model.ChangeKey.SelectedAccounts[iAcc];
+      sender_account := Model.Account.SelectedAccounts[iAcc];
       iWallet := TWallet.Keys.IndexOfAccountKey(sender_account.accountInfo.accountKey);
       iWallet := TWallet.Keys.IndexOfAccountKey(sender_account.accountInfo.accountKey);
       if (iWallet < 0) then
       if (iWallet < 0) then
       begin
       begin
@@ -203,7 +203,7 @@ begin
     end;
     end;
   end;
   end;
 
 
-  Result := UpdateOpChangeKey(Model.ChangeKey.SelectedAccounts[0], signer_account,
+  Result := UpdateOpChangeKey(Model.Account.SelectedAccounts[0], signer_account,
     publicKey, errors);
     publicKey, errors);
   UpdatePayload(sender_account, e);
   UpdatePayload(sender_account, e);
 end;
 end;
@@ -295,11 +295,11 @@ begin
     _signer_n_ops := 0;
     _signer_n_ops := 0;
     operationstxt := '';
     operationstxt := '';
     operation_to_string := '';
     operation_to_string := '';
-    for iAcc := Low(Model.ChangeKey.SelectedAccounts) to High(Model.ChangeKey.SelectedAccounts) do
+    for iAcc := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
     begin
     begin
       loop_start:
       loop_start:
         op := nil;
         op := nil;
-      account := Model.ChangeKey.SelectedAccounts[iAcc];
+      account := Model.Account.SelectedAccounts[iAcc];
       if not UpdatePayload(account, errors) then
       if not UpdatePayload(account, errors) then
       begin
       begin
         raise Exception.Create('Error encoding payload of sender account ' +
         raise Exception.Create('Error encoding payload of sender account ' +
@@ -326,11 +326,11 @@ begin
       if _V2 then
       if _V2 then
       begin
       begin
         // must ensure is Signer account last if included in sender accounts (not necessarily ordered enumeration)
         // must ensure is Signer account last if included in sender accounts (not necessarily ordered enumeration)
-        if (iAcc < Length(Model.ChangeKey.SelectedAccounts) - 1) and
+        if (iAcc < Length(Model.Account.SelectedAccounts) - 1) and
           (account.account = signerAccount.account) then
           (account.account = signerAccount.account) then
         begin
         begin
-          TArrayTool<TAccount>.Swap(Model.ChangeKey.SelectedAccounts, iAcc,
-            Length(Model.ChangeKey.SelectedAccounts) - 1); // ensure signer account processed last
+          TArrayTool<TAccount>.Swap(Model.Account.SelectedAccounts, iAcc,
+            Length(Model.Account.SelectedAccounts) - 1); // ensure signer account processed last
           // TArrayTool_internal<Cardinal>.Swap(_senderAccounts, iAcc, Length(_senderAccounts) - 1);
           // TArrayTool_internal<Cardinal>.Swap(_senderAccounts, iAcc, Length(_senderAccounts) - 1);
           goto loop_start; // TODO: remove ugly hack with refactoring!
           goto loop_start; // TODO: remove ugly hack with refactoring!
         end;
         end;
@@ -372,11 +372,11 @@ begin
     if (ops.OperationsCount = 0) then
     if (ops.OperationsCount = 0) then
       raise Exception.Create('No valid operation to execute');
       raise Exception.Create('No valid operation to execute');
 
 
-    if (Length(Model.ChangeKey.SelectedAccounts) > 1) then
+    if (Length(Model.Account.SelectedAccounts) > 1) then
     begin
     begin
       auxs := '';
       auxs := '';
       if Application.MessageBox(
       if Application.MessageBox(
-        PChar('Execute ' + IntToStr(Length(Model.ChangeKey.SelectedAccounts)) +
+        PChar('Execute ' + IntToStr(Length(Model.Account.SelectedAccounts)) +
         ' operations?' + #10 + 'Operation: ' + operationstxt + #10 +
         ' operations?' + #10 + 'Operation: ' + operationstxt + #10 +
         auxs + 'Total fee: ' + TAccountComp.FormatMoney(_totalfee) +
         auxs + 'Total fee: ' + TAccountComp.FormatMoney(_totalfee) +
         #10 + #10 + 'Note: This operation will be transmitted to the network!'),
         #10 + #10 + 'Note: This operation will be transmitted to the network!'),

+ 8 - 8
src/gui/wizards/operations/UWIZChangeKey_ConfirmAccount.pas

@@ -50,9 +50,9 @@ type
 
 
   TAccountChangeKeyDataSource = class(TAccountsDataSourceBase)
   TAccountChangeKeyDataSource = class(TAccountsDataSourceBase)
   private
   private
-    FModel: TWIZOperationsModel.TChangeKeyModel;
+    FModel: TWIZOperationsModel;
   public
   public
-    property Model: TWIZOperationsModel.TChangeKeyModel read FModel write FModel;
+    property Model: TWIZOperationsModel read FModel write FModel;
     procedure FetchAll(const AContainer: TList<TAccount>); override;
     procedure FetchAll(const AContainer: TList<TAccount>); override;
   end;
   end;
 
 
@@ -95,14 +95,14 @@ begin
     Filters := SORTABLE_NUMERIC_FILTER;
     Filters := SORTABLE_NUMERIC_FILTER;
   end;
   end;
   Data := TAccountChangeKeyDataSource.Create(FChangeKeyGrid);
   Data := TAccountChangeKeyDataSource.Create(FChangeKeyGrid);
-  Data.Model := Model.ChangeKey;
+  Data.Model := Model;
   FChangeKeyGrid.DataSource := Data;
   FChangeKeyGrid.DataSource := Data;
   paGrid.AddControlDockCenter(FChangeKeyGrid);
   paGrid.AddControlDockCenter(FChangeKeyGrid);
 
 
   totalBalance := 0;
   totalBalance := 0;
-  for i := Low(Model.ChangeKey.SelectedAccounts) to High(Model.ChangeKey.SelectedAccounts) do
+  for i := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
   begin
   begin
-    acc := Model.ChangeKey.SelectedAccounts[i];
+    acc := Model.Account.SelectedAccounts[i];
     totalBalance := totalBalance + acc.balance;
     totalBalance := totalBalance + acc.balance;
   end;
   end;
 
 
@@ -119,7 +119,7 @@ function TWIZChangeKey_ConfirmAccount.Validate(out message: ansistring): boolean
 begin
 begin
   Result := True;
   Result := True;
   // get signer accounts from selected accounts
   // get signer accounts from selected accounts
-  Model.Signer.SignerCandidates := TCoreTool.GetSignerCandidates(Length(Model.ChangeKey.SelectedAccounts), Model.ChangeKey.SelectedAccounts);
+  Model.Signer.SignerCandidates := TCoreTool.GetSignerCandidates(Length(Model.Account.SelectedAccounts), Model.Account.SelectedAccounts);
 
 
   if Length(Model.Signer.SignerCandidates) < 1 then
   if Length(Model.Signer.SignerCandidates) < 1 then
   begin
   begin
@@ -135,9 +135,9 @@ procedure TAccountChangeKeyDataSource.FetchAll(const AContainer: TList<TAccount>
 var
 var
   i: integer;
   i: integer;
 begin
 begin
-  for i := Low(Model.SelectedAccounts) to High(Model.SelectedAccounts) do
+  for i := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
   begin
   begin
-    AContainer.Add(Model.SelectedAccounts[i]);
+    AContainer.Add(Model.Account.SelectedAccounts[i]);
   end;
   end;
 end;
 end;
 
 

+ 2 - 2
src/gui/wizards/operations/UWIZChangeKey_Confirmation.pas

@@ -168,9 +168,9 @@ procedure TAccountChangeKeyDataSource.FetchAll(const AContainer: TList<TAccount>
 var
 var
   i: integer;
   i: integer;
 begin
 begin
-  for i := Low(Model.ChangeKey.SelectedAccounts) to High(Model.ChangeKey.SelectedAccounts) do
+  for i := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
   begin
   begin
-    AContainer.Add(Model.ChangeKey.SelectedAccounts[i]);
+    AContainer.Add(Model.Account.SelectedAccounts[i]);
   end;
   end;
 end;
 end;
 
 

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

@@ -7,6 +7,7 @@ object WIZChangeKey_EnterKey: TWIZChangeKey_EnterKey
   Caption = 'ChangeKey_EnterKey'
   Caption = 'ChangeKey_EnterKey'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbNewPublicKey: TGroupBox
   object gbNewPublicKey: TGroupBox
     Left = 16
     Left = 16

+ 2 - 2
src/gui/wizards/operations/UWIZChangeKey_EnterKey.pas

@@ -81,9 +81,9 @@ begin
     Result := False;
     Result := False;
     Exit;
     Exit;
   end;
   end;
-  for i := Low(Model.ChangeKey.SelectedAccounts) to High(Model.ChangeKey.SelectedAccounts) do
+  for i := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
   begin
   begin
-    if TAccountComp.EqualAccountKeys(Model.ChangeKey.SelectedAccounts[i].accountInfo.accountKey,
+    if TAccountComp.EqualAccountKeys(Model.Account.SelectedAccounts[i].accountInfo.accountKey,
       tempAccountKey) then
       tempAccountKey) then
     begin
     begin
       Result := False;
       Result := False;

+ 2 - 2
src/gui/wizards/operations/UWIZChangeKey_SelectKey.pas

@@ -148,9 +148,9 @@ begin
 
 
   tempAccountKey := TWallet.Keys.Key[PtrInt(cbNewPrivateKey.Items.Objects[cbNewPrivateKey.ItemIndex])].AccountKey;
   tempAccountKey := TWallet.Keys.Key[PtrInt(cbNewPrivateKey.Items.Objects[cbNewPrivateKey.ItemIndex])].AccountKey;
 
 
-   for i := Low(Model.ChangeKey.SelectedAccounts) to High(Model.ChangeKey.SelectedAccounts) do
+   for i := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
   begin
   begin
-    if TAccountComp.EqualAccountKeys(Model.ChangeKey.SelectedAccounts[i].accountInfo.accountKey,
+    if TAccountComp.EqualAccountKeys(Model.Account.SelectedAccounts[i].accountInfo.accountKey,
       tempAccountKey) then
       tempAccountKey) then
     begin
     begin
       Result := False;
       Result := False;

+ 2 - 2
src/gui/wizards/operations/UWIZFeeOverride.pas

@@ -18,7 +18,7 @@ interface
 uses
 uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
   ExtCtrls, Buttons, Spin, UCommon, UCommon.Collections, UWallet,
   ExtCtrls, Buttons, Spin, UCommon, UCommon.Collections, UWallet,
-  UFRMAccountSelect, UNode, UWizard, UWIZSendPASC, UWIZPayloadOverride, UWIZSelectSignerOverride, UWIZModels;
+  UFRMAccountSelect, UNode, UWizard, UWIZPayloadOverride, UWIZSelectSignerOverride, UWIZModels;
 
 
 type
 type
 
 
@@ -58,7 +58,7 @@ var
 begin
 begin
   TAccountComp.TxtToMoney(Trim(fseFee.ValueToStr(fseFee.Value)), opfee);
   TAccountComp.TxtToMoney(Trim(fseFee.ValueToStr(fseFee.Value)), opfee);
   lblTotalFeeValue.Caption := Format('%s PASC', [TAccountComp.FormatMoney(opfee *
   lblTotalFeeValue.Caption := Format('%s PASC', [TAccountComp.FormatMoney(opfee *
-    Length(Model.SendPASC.SelectedAccounts))]);
+    Length(Model.Account.SelectedAccounts))]);
 end;
 end;
 
 
 procedure TWIZFeeOverride.fseFeeChange(Sender: TObject);
 procedure TWIZFeeOverride.fseFeeChange(Sender: TObject);

+ 11 - 11
src/gui/wizards/operations/UWIZSendPASC.pas

@@ -67,7 +67,7 @@ begin
     Exit;
     Exit;
   end;
   end;
 
 
-  if Length(Model.SendPASC.SelectedAccounts) = 0 then
+  if Length(Model.Account.SelectedAccounts) = 0 then
   begin
   begin
     errors := 'No sender account';
     errors := 'No sender account';
     Exit;
     Exit;
@@ -75,9 +75,9 @@ begin
   else
   else
   begin
   begin
 
 
-    for iAcc := Low(Model.SendPASC.SelectedAccounts) to High(Model.SendPASC.SelectedAccounts) do
+    for iAcc := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
     begin
     begin
-      sender_account := Model.SendPASC.SelectedAccounts[iAcc];
+      sender_account := Model.Account.SelectedAccounts[iAcc];
       iWallet := TWallet.Keys.IndexOfAccountKey(sender_account.accountInfo.accountKey);
       iWallet := TWallet.Keys.IndexOfAccountKey(sender_account.accountInfo.accountKey);
       if (iWallet < 0) then
       if (iWallet < 0) then
       begin
       begin
@@ -105,7 +105,7 @@ begin
     end;
     end;
   end;
   end;
 
 
-  Result := UpdateOpTransaction(Model.SendPASC.SelectedAccounts[0], dest_account, amount, errors);
+  Result := UpdateOpTransaction(Model.Account.SelectedAccounts[0], dest_account, amount, errors);
   UpdatePayload(sender_account, e);
   UpdatePayload(sender_account, e);
 end;
 end;
 
 
@@ -119,7 +119,7 @@ begin
 
 
   DestAccount := Model.SendPASC.DestinationAccount;
   DestAccount := Model.SendPASC.DestinationAccount;
 
 
-  if Length(Model.SendPASC.SelectedAccounts) = 1 then
+  if Length(Model.Account.SelectedAccounts) = 1 then
   begin
   begin
     amount := Model.SendPASC.SingleAmountToSend;
     amount := Model.SendPASC.SingleAmountToSend;
   end
   end
@@ -134,7 +134,7 @@ begin
     Exit;
     Exit;
   end;
   end;
 
 
-  if (Length(Model.SendPASC.SelectedAccounts) = 1) then
+  if (Length(Model.Account.SelectedAccounts) = 1) then
   begin
   begin
     if (SenderAccount.balance < (amount + Model.Fee.SingleOperationFee)) then
     if (SenderAccount.balance < (amount + Model.Fee.SingleOperationFee)) then
     begin
     begin
@@ -170,10 +170,10 @@ begin
     _signer_n_ops := 0;
     _signer_n_ops := 0;
     operationstxt := '';
     operationstxt := '';
     operation_to_string := '';
     operation_to_string := '';
-    for iAcc := Low(Model.SendPASC.SelectedAccounts) to High(Model.SendPASC.SelectedAccounts) do
+    for iAcc := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
     begin
     begin
       op := nil;
       op := nil;
-      account := Model.SendPASC.SelectedAccounts[iAcc];
+      account := Model.Account.SelectedAccounts[iAcc];
       if not UpdatePayload(account, errors) then
       if not UpdatePayload(account, errors) then
       begin
       begin
         raise Exception.Create('Error encoding payload of sender account ' +
         raise Exception.Create('Error encoding payload of sender account ' +
@@ -195,7 +195,7 @@ begin
 
 
       if not UpdateOpTransaction(account, destAccount, _amount, errors) then
       if not UpdateOpTransaction(account, destAccount, _amount, errors) then
         raise Exception.Create(errors);
         raise Exception.Create(errors);
-      if Length(Model.SendPASC.SelectedAccounts) > 1 then
+      if Length(Model.Account.SelectedAccounts) > 1 then
       begin
       begin
         if account.balance > 0 then
         if account.balance > 0 then
         begin
         begin
@@ -240,12 +240,12 @@ begin
     if (ops.OperationsCount = 0) then
     if (ops.OperationsCount = 0) then
       raise Exception.Create('No valid operation to execute');
       raise Exception.Create('No valid operation to execute');
 
 
-    if (Length(Model.SendPASC.SelectedAccounts) > 1) then
+    if (Length(Model.Account.SelectedAccounts) > 1) then
     begin
     begin
       auxs := 'Total amount that dest will receive: ' + TAccountComp.FormatMoney(
       auxs := 'Total amount that dest will receive: ' + TAccountComp.FormatMoney(
         _totalamount) + #10;
         _totalamount) + #10;
       if Application.MessageBox(
       if Application.MessageBox(
-        PChar('Execute ' + IntToStr(Length(Model.SendPASC.SelectedAccounts)) +
+        PChar('Execute ' + IntToStr(Length(Model.Account.SelectedAccounts)) +
         ' operations?' + #10 + 'Operation: ' + operationstxt + #10 +
         ' operations?' + #10 + 'Operation: ' + operationstxt + #10 +
         auxs + 'Total fee: ' + TAccountComp.FormatMoney(_totalfee) +
         auxs + 'Total fee: ' + TAccountComp.FormatMoney(_totalfee) +
         #10 + #10 + 'Note: This operation will be transmitted to the network!'),
         #10 + #10 + 'Note: This operation will be transmitted to the network!'),

+ 6 - 6
src/gui/wizards/operations/UWIZSendPASC_ConfirmSender.pas

@@ -48,9 +48,9 @@ type
 
 
   TAccountSenderDataSource = class(TAccountsDataSourceBase)
   TAccountSenderDataSource = class(TAccountsDataSourceBase)
   private
   private
-    FModel: TWIZOperationsModel.TSendPASCModel;
+    FModel: TWIZOperationsModel;
   public
   public
-    property Model: TWIZOperationsModel.TSendPASCModel read FModel write FModel;
+    property Model: TWIZOperationsModel read FModel write FModel;
     procedure FetchAll(const AContainer: TList<TAccount>); override;
     procedure FetchAll(const AContainer: TList<TAccount>); override;
   end;
   end;
 
 
@@ -90,7 +90,7 @@ begin
     Filters := SORTABLE_NUMERIC_FILTER;
     Filters := SORTABLE_NUMERIC_FILTER;
   end;
   end;
   Data := TAccountSenderDataSource.Create(FSendersGrid);
   Data := TAccountSenderDataSource.Create(FSendersGrid);
-  Data.Model := Model.SendPASC;
+  Data.Model := Model;
   FSendersGrid.DataSource := Data;
   FSendersGrid.DataSource := Data;
   paGrid.AddControlDockCenter(FSendersGrid);
   paGrid.AddControlDockCenter(FSendersGrid);
 end;
 end;
@@ -104,7 +104,7 @@ function TWIZSendPASC_ConfirmSender.Validate(out message: ansistring): boolean;
 begin
 begin
   Result := True;
   Result := True;
   // get signer accounts from selected accounts
   // get signer accounts from selected accounts
-  Model.Signer.SignerCandidates := TCoreTool.GetSignerCandidates(Length(Model.SendPASC.SelectedAccounts), Model.SendPASC.SelectedAccounts);
+  Model.Signer.SignerCandidates := TCoreTool.GetSignerCandidates(Length(Model.Account.SelectedAccounts), Model.Account.SelectedAccounts);
 
 
   if Length(Model.Signer.SignerCandidates) < 1 then
   if Length(Model.Signer.SignerCandidates) < 1 then
   begin
   begin
@@ -120,9 +120,9 @@ procedure TAccountSenderDataSource.FetchAll(const AContainer: TList<TAccount>);
 var
 var
   i: integer;
   i: integer;
 begin
 begin
-  for i := Low(Model.SelectedAccounts) to High(Model.SelectedAccounts) do
+  for i := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
   begin
   begin
-    AContainer.Add(Model.SelectedAccounts[i]);
+    AContainer.Add(Model.Account.SelectedAccounts[i]);
   end;
   end;
 end;
 end;
 
 

+ 1 - 0
src/gui/wizards/operations/UWIZSendPASC_Confirmation.lfm

@@ -6,6 +6,7 @@ object WIZSendPASC_Confirmation: TWIZSendPASC_Confirmation
   Caption = 'WIZSendPASC_Confirmation'
   Caption = 'WIZSendPASC_Confirmation'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object GroupBox1: TGroupBox
   object GroupBox1: TGroupBox
     Left = 10
     Left = 10

+ 2 - 2
src/gui/wizards/operations/UWIZSendPASC_Confirmation.pas

@@ -133,9 +133,9 @@ procedure TAccountSenderDataSource.FetchAll(const AContainer : TList<TAccount>);
 var
 var
   i: Integer;
   i: Integer;
 begin
 begin
-  for i := Low(Model.SendPASC.SelectedAccounts) to High(Model.SendPASC.SelectedAccounts) do
+  for i := Low(Model.Account.SelectedAccounts) to High(Model.Account.SelectedAccounts) do
   begin
   begin
-    AContainer.Add( Model.SendPASC.SelectedAccounts[i] );
+    AContainer.Add( Model.Account.SelectedAccounts[i] );
   end;
   end;
 end;
 end;
 
 

+ 1 - 0
src/gui/wizards/operations/UWIZSendPASC_EnterRecipient.lfm

@@ -7,6 +7,7 @@ object WIZSendPASC_EnterRecipient: TWIZSendPASC_EnterRecipient
   Caption = 'WIZSendPASC_EnterRecipient'
   Caption = 'WIZSendPASC_EnterRecipient'
   ClientHeight = 253
   ClientHeight = 253
   ClientWidth = 429
   ClientWidth = 429
+  LCLVersion = '1.8.2.0'
   Visible = False
   Visible = False
   object gbRecipient: TGroupBox
   object gbRecipient: TGroupBox
     Left = 16
     Left = 16

+ 1 - 1
src/gui/wizards/operations/UWIZSendPASC_EnterRecipient.pas

@@ -154,7 +154,7 @@ begin
   end;
   end;
 
 
   AccountNumbersWithChecksum :=
   AccountNumbersWithChecksum :=
-    TListTool<TAccount, string>.Transform(Model.SendPASC.SelectedAccounts, GetAccNoWithCheckSum);
+    TListTool<TAccount, string>.Transform(Model.Account.SelectedAccounts, GetAccNoWithCheckSum);
 
 
   if TArrayTool<string>.Contains(AccountNumbersWithChecksum, edtDestAcc.Text) then
   if TArrayTool<string>.Contains(AccountNumbersWithChecksum, edtDestAcc.Text) then
   begin
   begin