Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
limemloh committed Sep 11, 2024
1 parent 672c25a commit 6180f2a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
8 changes: 4 additions & 4 deletions src/Types/BlockHashInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Concordium.Sdk.Types;
public interface IBlockHashInput
{
/// <summary>
/// Convert this into type expected by the gRPC.
/// Convert this into the type expected by the gRPC API.
/// </summary>
BlockHashInput Into();
}
Expand All @@ -21,7 +21,7 @@ public sealed record Best : IBlockHashInput
private static readonly Empty _empty = new();

/// <summary>
/// Convert this into type expected by the gRPC.
/// Convert this into the type expected by the gRPC API.
/// </summary>
public BlockHashInput Into() => new()
{
Expand All @@ -38,7 +38,7 @@ public sealed record LastFinal : IBlockHashInput
private static readonly Empty _empty = new();

/// <summary>
/// Convert this into type expected by the gRPC.
/// Convert this into the type expected by the gRPC API.
/// </summary>
public BlockHashInput Into() => new()
{
Expand All @@ -52,7 +52,7 @@ public sealed record LastFinal : IBlockHashInput
public sealed record Given(BlockHash BlockHash) : IBlockHashInput
{
/// <summary>
/// Convert this into type expected by the gRPC.
/// Convert this into the type expected by the gRPC API.
/// </summary>
public BlockHashInput Into() => new() { Given = this.BlockHash.ToProto() };
}
Expand Down
6 changes: 3 additions & 3 deletions src/Types/BlockHeight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Concordium.Sdk.Types;
public interface IBlockHeight
{
/// <summary>
/// Convert into a request for blocks at height.
/// Convert into a BlocksAtHeightRequest.
/// </summary>
BlocksAtHeightRequest Into();
}
Expand All @@ -22,7 +22,7 @@ public sealed record AbsoluteHeight(ulong Height) : IBlockHeight
internal static AbsoluteHeight From(AbsoluteBlockHeight blockHeight) => new(blockHeight.Value);

/// <summary>
/// Convert an AbsoluteHeight into a request for blocks at height.
/// Convert an AbsoluteHeight into a BlocksAtHeightRequest.
/// </summary>
public BlocksAtHeightRequest Into() =>
new()
Expand All @@ -47,7 +47,7 @@ public BlocksAtHeightRequest Into() =>
public sealed record RelativeHeight(ulong Height, uint GenesisIndex, bool Restrict) : IBlockHeight
{
/// <summary>
/// Convert an RelativeHeight into a request for blocks at height.
/// Convert a RelativeHeight into a BlocksAtHeightRequest.
/// </summary>
public BlocksAtHeightRequest Into() =>
new()
Expand Down
12 changes: 1 addition & 11 deletions src/Types/CcdAmount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,7 @@ public static bool TryDeserial(ReadOnlySpan<byte> bytes, out (CcdAmount? Amount,
/// <summary>
/// Return the largest of two amounts.
/// </summary>
public static CcdAmount Max(CcdAmount first, CcdAmount second)
{
if (first < second)
{
return second;
}
else
{
return first;
}
}
public static CcdAmount Max(CcdAmount first, CcdAmount second) => first < second ? second : first;

/// <summary> Determines whether one CcdAmount is less than a second CcdAmount. </summary>
public static bool operator <(CcdAmount left, CcdAmount right) => left.Value.CompareTo(right.Value) < 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Types/ReceiveName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public enum ValidationError
MissingDotSeparator,
/// <summary> The receive name is more than 100 characters. </summary>
TooLong,
/// <summary> The receive name contained invalid characters. </summary>
/// <summary> The receive name contained characters that are not ASCII alphanumeric or ASCII punctuation. </summary>
InvalidCharacters,
}

Expand Down

0 comments on commit 6180f2a

Please sign in to comment.