| 15 | public Map<String, Object> info; |
| 16 | |
| 17 | @SuppressWarnings("unchecked") |
| 18 | public Network(Object raw) { |
| 19 | Map<String, Object> data = TypeHelper.toMap(raw); |
| 20 | this.id = TypeHelper.safeString(data, "id"); |
| 21 | this.network = TypeHelper.safeString(data, "network"); |
| 22 | this.name = TypeHelper.safeString(data, "name"); |
| 23 | this.active = TypeHelper.safeBool(data, "active"); |
| 24 | this.fee = TypeHelper.safeFloat(data, "fee"); |
| 25 | this.precision = TypeHelper.safeFloat(data, "precision"); |
| 26 | this.deposit = TypeHelper.safeBool(data, "deposit"); |
| 27 | this.withdraw = TypeHelper.safeBool(data, "withdraw"); |
| 28 | Object limitsRaw = TypeHelper.safeValue(data, "limits"); |
| 29 | this.limits = limitsRaw != null ? new NetworkLimits(limitsRaw) : null; |
| 30 | this.info = TypeHelper.getInfo(data); |
| 31 | } |
| 32 | } |