fromJSON static method

Delegation fromJSON(
  1. StakingDelegationResponse data
)

Implementation

static Delegation fromJSON(StakingDelegationResponse data) {
  return Delegation(
      data.delegation.delegator_address,
      data.delegation.validator_address,
      double.parse(data.delegation.shares),
      Coin.fromJSON(data.balance));
}