Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Commit

Permalink
Cb2
Browse files Browse the repository at this point in the history
  • Loading branch information
NosoDevTeam committed Mar 6, 2024
1 parent 5aac04f commit 7d8c1c2
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 668 deletions.
2 changes: 1 addition & 1 deletion lastrelease.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.2Cb1 0.4.2Cb1 x {LastOfficial} {LastBeta} {TestNet}
0.4.2Cb2 0.4.2Cb2 x {LastOfficial} {LastBeta} {TestNet}
4 changes: 2 additions & 2 deletions masterpaskalform.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ object Form1: TForm1
Height = 488
Top = 38
Width = 640
ActivePage = tabOptions
ActivePage = TabWallet
Align = alTop
Anchors = [akTop, akLeft, akRight, akBottom]
Font.CharSet = ANSI_CHARSET
Expand All @@ -327,7 +327,7 @@ object Form1: TForm1
Font.Pitch = fpVariable
Font.Quality = fqDraft
ParentFont = False
TabIndex = 2
TabIndex = 0
TabOrder = 0
object TabWallet: TTabSheet
Caption = 'Wallet'
Expand Down
5 changes: 4 additions & 1 deletion masterpaskalform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ procedure TUpdateMNs.Execute;
LastRunMNVerification := UTCTime;
TextLine := RunMNVerification(MyLastBlock,GetSynctus,LocalMN_IP,GetWallArrIndex(WallAddIndex(LocalMN_Sign)).PublicKey,GetWallArrIndex(WallAddIndex(LocalMN_Sign)).PrivateKey);
OutGoingMsjsAdd(ProtocolLine(MNCheck)+TextLine);
ToLog('console','Masternodes Verification completed: '+TextLine)
//ToLog('console','Masternodes Verification completed: '+TextLine)
end;
end;
While LengthWaitingMNs > 0 do
Expand Down Expand Up @@ -2825,9 +2825,12 @@ procedure TForm1.IdTCPServer1Exception(AContext: TIdContext;AException: Exceptio
// Copy address button
Procedure TForm1.BCopyAddrClick(sender: TObject);
Begin
Clipboard.AsText:= DireccionesPanel.Cells[0,DireccionesPanel.Row];
{
if GetWallArrIndex(DireccionesPanel.Row-1).custom <> '' then
Clipboard.AsText:= GetWallArrIndex(DireccionesPanel.Row-1).custom
else Clipboard.AsText:= GetWallArrIndex(DireccionesPanel.Row-1).Hash;
}
info('Copied to clipboard');//'Copied to clipboard'
End;

Expand Down
3 changes: 2 additions & 1 deletion mpparser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,8 @@ function SendFunds(LineText:string;showOutput:boolean=true):string;
end;
Setlength(orderstring,length(orderstring)-2);
OrderString := StringReplace(OrderString,'PSK','NSLORDER',[]);
result := SendOrderToNode(OrderString);
ToLog('console','Send to Node '+OrderString);
//result := SendOrderToNode(OrderString);
ToLog('console','Node result: '+result);
//OutgoingMsjsAdd(OrderString);
EndPerformance('SendFunds');
Expand Down
27 changes: 27 additions & 0 deletions mprpc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function RPC_NewAddressFull(NosoPParams:string):string;
Function RPC_SetDefault(NosoPParams:string):string;
Function RPC_GVTInfo(NosoPParams:string):string;
Function RPC_CheckCertificate(NosoPParams:string):string;
Function RPC_SubmitOrder(NosoPParams:string;waitresponse:boolean=false):string;
function RPC_SendFunds(NosoPParams:string):string;


Expand Down Expand Up @@ -425,6 +426,15 @@ function ObjectFromString(MyString:string): string;
else if objecttype = 'walletbalance' then
begin
resultado.Add('balance',StrToInt64(parameter(mystring,1)))
end
else if objecttype = 'submitorder' then
begin
resultado.Add('result',StrToBool(parameter(mystring,1)))
end
else if objecttype = 'submitorderwr' then
begin
resultado.Add('result',StrToBool(parameter(mystring,1)));
resultado.Add('response',StringReplace(parameter(mystring,2),'_',' ',[rfReplaceAll, rfIgnoreCase]))
end;

result := resultado.AsJSON;
Expand Down Expand Up @@ -479,6 +489,8 @@ function ParseRPCJSON(jsonreceived:string):string;
else if method = 'getgvtinfo' then result := GetJSONResponse(RPC_GVTInfo(NosoPParams),jsonid)
else if method = 'sendfunds' then result := GetJSONResponse(RPC_SendFunds(NosoPParams),jsonid)
else if method = 'checkcertificate' then result := GetJSONResponse(RPC_CheckCertificate(NosoPParams),jsonid)
else if method = 'submitorder' then result := GetJSONResponse(RPC_SubmitOrder(NosoPParams),jsonid)
else if method = 'submitorderwr' then result := GetJSONResponse(RPC_SubmitOrder(NosoPParams,true),jsonid)
else result := GetJSONErrorCode(402,-1);
Except on E:Exception do
ToLog('exceps',FormatDateTime('dd mm YYYY HH:MM:SS.zzz', Now)+' -> '+'JSON RPC error: '+E.Message);
Expand Down Expand Up @@ -879,6 +891,21 @@ function RPC_NewAddressFull(NosoPParams:string):string;
end;
End;


Function RPC_SubmitOrder(NosoPParams:string;waitresponse:boolean=false):string;
var
ResultLine : string;
Begin
//ToLog('Console',NosoPParams);
ResultLine := SendOrderToNode(NosoPParams);
ResultLine := StringReplace(ResultLine,' ','_',[rfReplaceAll, rfIgnoreCase]);
if not waitresponse then result := 'submitorder'#127'True'
else
begin
result := 'submitorderwr'#127'True'#127+ResultLine;
end;
End;

function RPC_SendFunds(NosoPParams:string):string;
var
destination, reference : string;
Expand Down
Loading

0 comments on commit 7d8c1c2

Please sign in to comment.