Map<String, dynamic> toJson() => { "coin_identifier": coin_identifier.toJson(), "amount": amount.toJson() }..removeWhere( (dynamic key, dynamic value) => key == null || value == null);