Skip to content

Commit

Permalink
fix api entity types
Browse files Browse the repository at this point in the history
  • Loading branch information
michavie committed May 4, 2022
1 parent f896de2 commit 5dd070c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/Api/Entities/MexPair.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,15 @@ final class MexPair

public function __construct(
public string $baseId,
public Balance $basePrice,
public float $basePrice,
public string $baseSymbol,
public string $baseName,
public string $quoteId,
public string $quotePrice,
public float $quotePrice,
public string $quoteSymbol,
public string $quoteName,
public string $totalValue,
public ?string $volume24h = null,
) {
}

public static function fromApiResponse(array $res): static
{
return new static(...static::filterUnallowedProperties(array_merge($res, [
'basePrice' => Balance::egld($res['basePrice']),
])));
}
}
2 changes: 1 addition & 1 deletion src/Api/Entities/TokenDetailedWithBalance.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ final class TokenDetailedWithBalance
public function __construct(
public string $identifier,
public string $name,
public string $ticker,
public string $owner,
public int $decimals,
public bool $isPaused,
Expand All @@ -26,6 +25,7 @@ public function __construct(
public bool $canFreeze,
public bool $canWipe,
public Balance $balance,
public ?string $ticker = null,
public ?string $burnt = null,
public ?string $minted = null,
public ?string $supply = null,
Expand Down

0 comments on commit 5dd070c

Please sign in to comment.