mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
6414364602
* New price API * Fix test app package id * Fix workflow * change environment variable to use pr number [skip ci] * Fix un-needed padding * Fix raw value for usdtSol * Remove duplicate fetching for balance and transactions at start [skip ci] * Fix address validation of spl tokens * Add Service Status * Update lib/src/widgets/service_status_tile.dart Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com> * Update lib/src/widgets/services_updates_widget.dart Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com> * Update monero version * update sodium script * Change automatic priority fee rate --------- Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
41 lines
1.1 KiB
Dart
41 lines
1.1 KiB
Dart
class ServiceStatus {
|
|
final String title;
|
|
final String description;
|
|
final String? image;
|
|
final String? status;
|
|
final DateTime date;
|
|
|
|
ServiceStatus(
|
|
{required this.title,
|
|
required this.description,
|
|
required this.date,
|
|
this.image,
|
|
this.status});
|
|
|
|
factory ServiceStatus.fromJson(Map<String, dynamic> json) => ServiceStatus(
|
|
title: json['title'] as String? ?? '',
|
|
description: json['description'] as String? ?? '',
|
|
date: DateTime.tryParse(json['date'] as String? ?? '') ?? DateTime.now(),
|
|
image: json['image'] as String?,
|
|
status: json['status'] as String?,
|
|
);
|
|
}
|
|
|
|
class ServicesResponse {
|
|
final List<ServiceStatus> servicesStatus;
|
|
final bool hasUpdates;
|
|
final String currentSha;
|
|
|
|
ServicesResponse(this.servicesStatus, this.hasUpdates, this.currentSha);
|
|
|
|
factory ServicesResponse.fromJson(
|
|
Map<String, dynamic> json, bool hasUpdates, String currentSha) {
|
|
return ServicesResponse(
|
|
(json['notices'] as List? ?? [])
|
|
.map((e) => ServiceStatus.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
hasUpdates,
|
|
currentSha,
|
|
);
|
|
}
|
|
}
|