Skip to content

Commit ea7eca6

Browse files
authored
Remove empty string circumventions (#7)
1 parent 4371152 commit ea7eca6

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

src/ZenonCli/Commands/Bridge.Admin.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ protected override async Task ProcessAsync()
3131
await AssertBridgeAdminAsync();
3232

3333
WriteInfo("Halting the bridge ...");
34-
// Use signature value '1' to circumvent the empty string unpack issue.
35-
await ZnnClient.Send(ZnnClient.Embedded.Bridge.Halt("1"));
34+
await ZnnClient!.Send(ZnnClient!.Embedded.Bridge.Halt(""));
3635
WriteInfo("Done");
3736
}
3837
}

src/ZenonCli/Commands/CommandBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ protected BigInteger ParseAmount(string value, long decimals, string argumentNam
171171
{
172172
try
173173
{
174-
return AmountUtils.ExtractDecimals(double.Parse(value, NumberStyles.Any, CultureInfo.InvariantCulture), (int)decimals);
174+
return AmountUtils.ExtractDecimals(value, (int)decimals);
175175
}
176176
catch (Exception e)
177177
{

src/ZenonCli/Commands/Orchestrator.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ protected override async Task ProcessAsync()
5959
WriteInfo("Changing public key...");
6060
}
6161

62-
// Use signature value '1' to circumvent the empty string unpack issue.
63-
await ZnnClient.Send(ZnnClient.Embedded.Bridge.ChangeTssECDSAPubKey(this.PubKey, "1", "1"));
62+
await ZnnClient!.Send(ZnnClient!.Embedded.Bridge.ChangeTssECDSAPubKey(this.PubKey, "", ""));
6463
WriteInfo("Done");
6564
}
6665
}
@@ -78,11 +77,8 @@ protected override async Task ProcessAsync()
7877
await AssertBridgeAdminAsync();
7978
}
8079

81-
// Use signature value '1' to circumvent the empty string unpack issue.
82-
var signature = Signature ?? "1";
83-
8480
WriteInfo("Halting bridge operations ...");
85-
await ZnnClient.Send(ZnnClient.Embedded.Bridge.Halt(signature));
81+
await ZnnClient!.Send(ZnnClient!.Embedded.Bridge.Halt(Signature));
8682
WriteInfo("Done");
8783
}
8884
}

src/ZenonCli/ZenonCli.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<ItemGroup>
2424
<PackageReference Include="CommandLineParser" Version="2.9.1" />
2525
<PackageReference Include="Cryptography.ECDSA.Secp256k1" Version="1.1.3" />
26-
<PackageReference Include="Zenon.Sdk" Version="0.6.4" />
26+
<PackageReference Include="Zenon.Sdk" Version="0.6.6" />
2727
</ItemGroup>
2828

2929
</Project>

0 commit comments

Comments
 (0)