fix: layout cert message; show renewable message before cert delay

This commit is contained in:
poka 2022-06-06 17:05:35 +02:00
parent 5c49be4f12
commit 48e2b09b22
3 changed files with 7 additions and 7 deletions

View File

@ -597,14 +597,14 @@ class SubstrateSdk with ChangeNotifier {
_removableOn.toString() + _removableOn.toString() +
'\n' + '\n' +
_nextIssuableOn.toString()); _nextIssuableOn.toString());
if (_nextIssuableOn > blocNumber) { if (_renewableOn != 0) {
final certDelayDuration = (_nextIssuableOn - blocNumber) * 6;
_result.putIfAbsent('certDelay', () => certDelayDuration);
return _result;
} else if (_renewableOn != 0) {
final certRenewDuration = (_renewableOn - blocNumber) * 6; final certRenewDuration = (_renewableOn - blocNumber) * 6;
_result.putIfAbsent('certRenewable', () => certRenewDuration); _result.putIfAbsent('certRenewable', () => certRenewDuration);
return _result; return _result;
} else if (_nextIssuableOn > blocNumber) {
final certDelayDuration = (_nextIssuableOn - blocNumber) * 6;
_result.putIfAbsent('certDelay', () => certDelayDuration);
return _result;
} else { } else {
_result.putIfAbsent('canCert', () => 0); _result.putIfAbsent('canCert', () => 0);
return _result; return _result;

View File

@ -289,7 +289,7 @@ class WalletViewScreen extends StatelessWidget {
), ),
), ),
Text( Text(
"Vous pourrez renouveller cette certification\ndans \n$_duration", "Vous pourrez renouveller\ncette certification\ndans $_duration",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: buttonFontSize - 4, fontSize: buttonFontSize - 4,

View File

@ -48,7 +48,7 @@ dependencies:
qr_flutter: #^4.0.0 qr_flutter: #^4.0.0
git: git:
url: https://github.com/insinfo/qr.flutter.git url: https://github.com/insinfo/qr.flutter.git
ref: master # branch name ref: master
responsive_builder: ^0.4.1 responsive_builder: ^0.4.1
responsive_framework: ^0.2.0 responsive_framework: ^0.2.0
sentry: ^6.5.1 sentry: ^6.5.1