mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
Generic fixes (#1320)
* 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>
This commit is contained in:
co-authored by
Konstantin Ullrich
parent
c7deeaea9b
commit
6414364602
@@ -72,4 +72,5 @@ class PreferencesKey {
|
||||
static const lastSeenAppVersion = 'last_seen_app_version';
|
||||
static const shouldShowMarketPlaceInDashboard = 'should_show_marketplace_in_dashboard';
|
||||
static const isNewInstall = 'is_new_install';
|
||||
static const serviceStatusShaKey = 'service_status_sha_key';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user