LiquidityPoolPriceResponse.fromJson constructor

LiquidityPoolPriceResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory LiquidityPoolPriceResponse.fromJson(Map<String, dynamic> json) {
  int pn = json['n'] == null
      ? throw Exception("n is null in horizon response")
      : json['n']!;
  int pd = json['d'] == null
      ? throw Exception("d is null in horizon response")
      : json['d']!;
  return LiquidityPoolPriceResponse(pn, pd);
}