Skip to content

Commit

Permalink
1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DevTeamNoso committed May 12, 2023
1 parent 9abac60 commit 7524bd5
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 18 deletions.
16 changes: 16 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
* version 1.50

- Completely adapted to new crypto functions.
- Upgraded to new fees calculation.

* version 1.30

- Added try-catch on show wallet folder.
- Opendocument implemented for cross compatibility.
- Removed old nodes tab.
- Removed old log tab.
- Fixed bug on check certificate when it is incorrect.
- Added form for liqpool.
- Implemented secure login to liqpool.
- Nosocfg download.

* version 1.29

- New default seed node.
Expand Down
43 changes: 40 additions & 3 deletions nl_cripto.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface

uses
Classes, SysUtils, nl_data, nl_signerutils, HlpHashFactory, Base64, nl_language,
nl_GUI, nl_network, MD5, infoform, forms, StrUtils;
nl_GUI, nl_network, MD5, infoform, forms, StrUtils, ClpConverters,ClpBigInteger,SbpBase58;

Function CreateNewAddress(keysData:string = ''):WalletData;
function GetAddressFromPublicKey(PubKey:String):String;
Expand Down Expand Up @@ -37,6 +37,11 @@ function BMB58resumen(numero58:string):string;
function BMDecTo58(numero:string):string;
function BMDecToHex(numero:string):string;

// NEw Crypto
Function B16ToB58(const sHex: String): String;
Function B10ToB58(const sVal: String): String;


implementation

Uses
Expand Down Expand Up @@ -75,9 +80,9 @@ function GetAddressFromPublicKey(PubKey:String):String;
Begin
PubSHAHashed := HashSha256String(PubKey);
Hash1 := HashMD160String(PubSHAHashed);
hash1 := BMHexTo58(Hash1,58);
hash1 := B16ToB58(Hash1);
sumatoria := BMB58resumen(Hash1);
clave := BMDecTo58(sumatoria);
clave := B10ToB58(sumatoria);
hash2 := hash1+clave;
Result := 'N'+hash2;
End;
Expand Down Expand Up @@ -714,5 +719,37 @@ function BMDecToHex(numero:string):string;
result := resultado;
End;

// NEw crypto function

Function B16ToB58(const sHex: String): String;
var
bytes: TBytes;
S: String;
Begin
Result := '1';
S := sHex.Trim;
if (Length(S) = 0) then
Exit;
if (Length(S) mod 2) <> 0 then
S := Concat('0', S);
try
bytes := TConverters.ConvertHexStringToBytes(S);
except
Exit { invalid HEX input }
end;
Result := TBase58.BitCoin.Encode(TBigInteger.Create(bytes).ToByteArrayUnsigned);
End;

Function B10ToB58(const sVal: String): String;
var
S: String;
Begin
Result := '1';
S := sVal.Trim;
if (Length(S) = 0) then
Exit;
Result := TBase58.BitCoin.Encode(TBigInteger.Create(S).ToByteArrayUnsigned);
End;

End. // END UNIT

2 changes: 1 addition & 1 deletion nl_data.pas
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ TUpdateThread = class(TThread)
Comisiontrfr = 10000;
MinimunFee = 1000000;
Protocol = 2;
ProgramVersion = '1.40';
ProgramVersion = '1.50';

HexAlphabet : string = '0123456789ABCDEF';
B58Alphabet : string = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
Expand Down
8 changes: 4 additions & 4 deletions nl_mainform.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ object Form1: TForm1
Height = 424
Top = 0
Width = 640
ActivePage = TabWallet
ActivePage = TabLiqPool
Align = alClient
TabIndex = 0
TabIndex = 2
TabOrder = 0
object TabWallet: TTabSheet
Caption = 'Wallet'
Expand Down Expand Up @@ -1050,9 +1050,9 @@ object Form1: TForm1
Height = 207
Top = 32
Width = 358
ActivePage = TabSheet3
ActivePage = TabSheet4
Align = alClient
TabIndex = 0
TabIndex = 1
TabOrder = 0
object TabSheet3: TTabSheet
Caption = 'Buy'
Expand Down
7 changes: 6 additions & 1 deletion nl_mainform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,11 @@ procedure TForm1.MenuItem3Click(Sender: TObject);
InputResult : boolean;
Begin
InputResult := InputQuery(rsDIA0001, rsDIA0002, TRUE, UserString);
if ((InputResult) and (UserString<>'')) then ImportKeys(UserString);
if ((InputResult) and (UserString<>'')) then
begin
ImportKeys(UserString);
REF_Addresses := true;
end;
End;

// Copy address to clipboard
Expand Down Expand Up @@ -800,6 +804,7 @@ procedure TForm1.MenuItem16Click(Sender: TObject);
else
begin
QRKeys := ARRAY_Addresses[CurrPos].PublicKey+' '+ARRAY_Addresses[CurrPos].PrivateKey;
//ToLog(ARRAY_Addresses[CurrPos].PublicKey+' '+ARRAY_Addresses[CurrPos].PrivateKey);
form2.Button2.Visible:=true;
end;
form2.show;
Expand Down
12 changes: 3 additions & 9 deletions releasenotes.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
* version 1.30
* version 1.50

- Added try-catch on show wallet folder.
- Opendocument implemented for cross compatibility.
- Removed old nodes tab.
- Removed old log tab.
- Fixed bug on check certificate when it is incorrect.
- Added form for liqpool.
- Implemented secure login to liqpool.
- Nosocfg download.
- Completely adapted to new crypto functions.
- Upgraded to new fees calculation.

0 comments on commit 7524bd5

Please sign in to comment.