Updates codex marketplace API types

This commit is contained in:
Ben 2024-03-22 11:15:22 +01:00
parent 635849c37a
commit a27b294031
No known key found for this signature in database
GPG Key ID: 541B9D8C9F1426A1
2 changed files with 5 additions and 4 deletions

View File

@ -87,7 +87,7 @@ namespace CodexPlugin
public class CodexSalesAvailabilityRequest public class CodexSalesAvailabilityRequest
{ {
public string size { get; set; } = string.Empty; public string totalSize { get; set; } = string.Empty;
public string duration { get; set; } = string.Empty; public string duration { get; set; } = string.Empty;
public string minPrice { get; set; } = string.Empty; public string minPrice { get; set; } = string.Empty;
public string maxCollateral { get; set; } = string.Empty; public string maxCollateral { get; set; } = string.Empty;
@ -96,7 +96,8 @@ namespace CodexPlugin
public class CodexSalesAvailabilityResponse public class CodexSalesAvailabilityResponse
{ {
public string id { get; set; } = string.Empty; public string id { get; set; } = string.Empty;
public string size { get; set; } = string.Empty; public string totalSize { get; set; } = string.Empty;
public string freeSize { get; set; } = string.Empty;
public string duration { get; set; } = string.Empty; public string duration { get; set; } = string.Empty;
public string minPrice { get; set; } = string.Empty; public string minPrice { get; set; } = string.Empty;
public string maxCollateral { get; set; } = string.Empty; public string maxCollateral { get; set; } = string.Empty;

View File

@ -67,7 +67,7 @@ namespace CodexPlugin
{ {
return new CodexSalesAvailabilityRequest return new CodexSalesAvailabilityRequest
{ {
size = ToDecInt(TotalSpace.SizeInBytes), totalSize = ToDecInt(TotalSpace.SizeInBytes),
duration = ToDecInt(MaxDuration.TotalSeconds), duration = ToDecInt(MaxDuration.TotalSeconds),
maxCollateral = ToDecInt(MaxCollateral), maxCollateral = ToDecInt(MaxCollateral),
minPrice = ToDecInt(MinPriceForTotalSpace) minPrice = ToDecInt(MinPriceForTotalSpace)
@ -77,7 +77,7 @@ namespace CodexPlugin
public void Log(ILog log) public void Log(ILog log)
{ {
log.Log($"Making storage available... (" + log.Log($"Making storage available... (" +
$"size: {TotalSpace}, " + $"totalSize: {TotalSpace}, " +
$"maxDuration: {Time.FormatDuration(MaxDuration)}, " + $"maxDuration: {Time.FormatDuration(MaxDuration)}, " +
$"minPriceForTotalSpace: {MinPriceForTotalSpace}, " + $"minPriceForTotalSpace: {MinPriceForTotalSpace}, " +
$"maxCollateral: {MaxCollateral})"); $"maxCollateral: {MaxCollateral})");