mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-21 10:24:15 +01:00
TMP 1
This commit is contained in:
@@ -9,24 +9,19 @@ abstract class SyncStatus {
|
||||
}
|
||||
|
||||
class SyncingSyncStatus extends SyncStatus {
|
||||
SyncingSyncStatus(this.height, this.blockchainHeight, this.refreshHeight);
|
||||
SyncingSyncStatus(this.blocksLeft, this.ptc);
|
||||
|
||||
final int height;
|
||||
final int blockchainHeight;
|
||||
final int refreshHeight;
|
||||
final double ptc;
|
||||
final int blocksLeft;
|
||||
|
||||
@override
|
||||
double progress() {
|
||||
final line = blockchainHeight - refreshHeight;
|
||||
final diff = line - (blockchainHeight - height);
|
||||
return diff <= 0 ? 0.0 : diff / line;
|
||||
}
|
||||
double progress() => ptc;
|
||||
|
||||
@override
|
||||
String title() => S.current.sync_status_syncronizing;
|
||||
|
||||
@override
|
||||
String toString() => '${blockchainHeight - height}';
|
||||
String toString() => '$blocksLeft';
|
||||
}
|
||||
|
||||
class SyncedSyncStatus extends SyncStatus {
|
||||
|
||||
Reference in New Issue
Block a user