Skip to content

Commit

Permalink
fix get pins
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Oct 8, 2024
1 parent a759dd3 commit 4cd1d7e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions src/BeeNet.Client/BeeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,11 @@ public async Task<IDictionary<string, BzzBalance>> GetAllConsumedBalancesAsync(
public async Task<IEnumerable<string>> GetAllPeerAddressesAsync(CancellationToken cancellationToken = default) =>
(await generatedClient.PeersGetAsync(cancellationToken).ConfigureAwait(false)).Peers.Select(i => i.Address);

public async Task<IEnumerable<SwarmHash>> GetAllPinsAsync(CancellationToken cancellationToken = default) =>
(await generatedClient.PinsGetAsync(cancellationToken).ConfigureAwait(false)).Reference
.Select(h => new SwarmHash(h));
public async Task<IEnumerable<SwarmHash>> GetAllPinsAsync(CancellationToken cancellationToken = default)
{
var response = await generatedClient.PinsGetAsync(cancellationToken).ConfigureAwait(false);
return (response.References ?? []).Select(h => new SwarmHash(h));
}

public async Task<Settlement> GetAllSettlementsAsync(CancellationToken cancellationToken = default)
{
Expand Down
4 changes: 2 additions & 2 deletions src/BeeNet.Client/Clients/BeeGeneratedClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10523,8 +10523,8 @@ public System.Collections.Generic.IDictionary<string, object> AdditionalProperti
internal partial class Response14
{

[System.Text.Json.Serialization.JsonPropertyName("reference")]
public System.Collections.Generic.ICollection<string> Reference { get; set; } = default!;
[System.Text.Json.Serialization.JsonPropertyName("references")]
public System.Collections.Generic.ICollection<string> References { get; set; } = default!;

private System.Collections.Generic.IDictionary<string, object>? _additionalProperties;

Expand Down
2 changes: 1 addition & 1 deletion tools/GatewaySwarm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ paths:
schema:
type: object
properties:
reference:
references:
type: array
nullable: false
items:
Expand Down
2 changes: 1 addition & 1 deletion tools/openapi/SwarmCommon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ components:
SwarmOnlyReferencesList:
type: object
properties:
reference:
references:
type: array
nullable: false
items:
Expand Down

0 comments on commit 4cd1d7e

Please sign in to comment.