forked from axiom-team/gecko
fix: can't cert if identity is not confirmed
This commit is contained in:
parent
0983c1d01e
commit
5ce381b174
|
@ -147,6 +147,7 @@
|
||||||
"execTimeoutOver": "Execution timeout is over",
|
"execTimeoutOver": "Execution timeout is over",
|
||||||
"seeAWallet": "See a wallet",
|
"seeAWallet": "See a wallet",
|
||||||
"mustWaitXBeforeCertify": "You have to wait\n{} before\ncertifying again",
|
"mustWaitXBeforeCertify": "You have to wait\n{} before\ncertifying again",
|
||||||
|
"mustConfirmHisIdentity": "This person must confirm\nhis identity before can be\ncertified",
|
||||||
"canRenewCertInX": "You can renew\nthis certification\nin {}",
|
"canRenewCertInX": "You can renew\nthis certification\nin {}",
|
||||||
"executeATransfer": "Execute a transfer",
|
"executeATransfer": "Execute a transfer",
|
||||||
"executeTheTransfer": "Execute the transfer",
|
"executeTheTransfer": "Execute the transfer",
|
||||||
|
|
|
@ -147,6 +147,7 @@
|
||||||
"execTimeoutOver": "Execution timeout is over",
|
"execTimeoutOver": "Execution timeout is over",
|
||||||
"seeAWallet": "See a wallet",
|
"seeAWallet": "See a wallet",
|
||||||
"mustWaitXBeforeCertify": "You have to wait\n{} before\ncertifying again",
|
"mustWaitXBeforeCertify": "You have to wait\n{} before\ncertifying again",
|
||||||
|
"mustConfirmHisIdentity": "This person must confirm\nhis identity before can be\ncertified",
|
||||||
"canRenewCertInX": "You can renew\nthis certification\nin {}",
|
"canRenewCertInX": "You can renew\nthis certification\nin {}",
|
||||||
"executeATransfer": "Execute a transfer",
|
"executeATransfer": "Execute a transfer",
|
||||||
"executeTheTransfer": "Execute the transfer",
|
"executeTheTransfer": "Execute the transfer",
|
||||||
|
|
|
@ -148,6 +148,7 @@
|
||||||
"execTimeoutOver": "Le délais d'éxecution est dépassé",
|
"execTimeoutOver": "Le délais d'éxecution est dépassé",
|
||||||
"seeAWallet": "Voir un portefeuille",
|
"seeAWallet": "Voir un portefeuille",
|
||||||
"mustWaitXBeforeCertify": "Vous devez attendre\n{} avant\nde pouvoir certifier",
|
"mustWaitXBeforeCertify": "Vous devez attendre\n{} avant\nde pouvoir certifier",
|
||||||
|
"mustConfirmHisIdentity": "Cette personne doit confirmer\nson identité avant de pouvoir\nêtre certifié",
|
||||||
"canRenewCertInX": "Vous pourrez renouveller\ncette certification\ndans {}",
|
"canRenewCertInX": "Vous pourrez renouveller\ncette certification\ndans {}",
|
||||||
"executeATransfer": "Effectuer un virement",
|
"executeATransfer": "Effectuer un virement",
|
||||||
"executeTheTransfer": "Effectuer le virement",
|
"executeTheTransfer": "Effectuer le virement",
|
||||||
|
|
|
@ -227,9 +227,13 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
} else {
|
} else {
|
||||||
result.putIfAbsent('canCert', () => 0);
|
result.putIfAbsent('canCert', () => 0);
|
||||||
}
|
}
|
||||||
// log.d('tatatatata: ${nextIssuableOn - blocNumber}');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final toStatus = await idtyStatus(to);
|
||||||
|
// log.d('certMeta: $toStatus');
|
||||||
|
|
||||||
|
if (toStatus == 'Created') result.putIfAbsent('toStatus', () => 1);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -797,8 +801,7 @@ class AddressInfo {
|
||||||
void snackNode(BuildContext context, bool isConnected) {
|
void snackNode(BuildContext context, bool isConnected) {
|
||||||
String message;
|
String message;
|
||||||
if (!isConnected) {
|
if (!isConnected) {
|
||||||
message =
|
message = "noDuniterNodeAvailableTryLater".tr();
|
||||||
"noDuniterNodeAvailableTryLater".tr();
|
|
||||||
} else {
|
} else {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
|
|
|
@ -191,6 +191,8 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final toStatus = snapshot.data!['toStatus'] ?? 0;
|
||||||
|
|
||||||
return Visibility(
|
return Visibility(
|
||||||
visible: (snapshot.data != {}),
|
visible: (snapshot.data != {}),
|
||||||
child: Column(children: <Widget>[
|
child: Column(children: <Widget>[
|
||||||
|
@ -269,66 +271,13 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
if (snapshot.data!['certDelay'] != null)
|
if (toStatus == 1)
|
||||||
Column(children: <Widget>[
|
waitToCert('mustConfirmHisIdentity', duration)
|
||||||
SizedBox(
|
else if (snapshot.data!['certRenewable'] != null &&
|
||||||
height: buttonSize,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(bottom: 0),
|
|
||||||
child: Container(
|
|
||||||
foregroundDecoration: const BoxDecoration(
|
|
||||||
color: Colors.grey,
|
|
||||||
backgroundBlendMode: BlendMode.saturation,
|
|
||||||
),
|
|
||||||
child: const Opacity(
|
|
||||||
opacity: 0.5,
|
|
||||||
child: Image(
|
|
||||||
image: AssetImage(
|
|
||||||
'assets/gecko_certify.png')),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"mustWaitXBeforeCertify"
|
|
||||||
.tr(args: [duration.toString()]),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: buttonFontSize - 4,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
color: Colors.grey[600]),
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
if (snapshot.data!['certRenewable'] != null &&
|
|
||||||
duration != 'seconds'.tr(args: ['0']))
|
duration != 'seconds'.tr(args: ['0']))
|
||||||
Column(children: <Widget>[
|
waitToCert('canRenewCertInX', duration)
|
||||||
SizedBox(
|
else if (snapshot.data!['certDelay'] != null)
|
||||||
height: buttonSize,
|
waitToCert('mustWaitXBeforeCertify', duration)
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(bottom: 0),
|
|
||||||
child: Container(
|
|
||||||
foregroundDecoration: const BoxDecoration(
|
|
||||||
color: Colors.grey,
|
|
||||||
backgroundBlendMode: BlendMode.saturation,
|
|
||||||
),
|
|
||||||
child: const Opacity(
|
|
||||||
opacity: 0.5,
|
|
||||||
child: Image(
|
|
||||||
image: AssetImage(
|
|
||||||
'assets/gecko_certify.png')),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"canRenewCertInX".tr(args: [duration.toString()]),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: buttonFontSize - 4,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
color: Colors.grey[600]),
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -415,6 +364,35 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget waitToCert(String status, String duration) {
|
||||||
|
return Column(children: <Widget>[
|
||||||
|
SizedBox(
|
||||||
|
height: buttonSize,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 0),
|
||||||
|
child: Container(
|
||||||
|
foregroundDecoration: const BoxDecoration(
|
||||||
|
color: Colors.grey,
|
||||||
|
backgroundBlendMode: BlendMode.saturation,
|
||||||
|
),
|
||||||
|
child: const Opacity(
|
||||||
|
opacity: 0.5,
|
||||||
|
child: Image(image: AssetImage('assets/gecko_certify.png')),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
status.tr(args: [duration]),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: buttonFontSize - 4,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
color: Colors.grey[600]),
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
void paymentPopup(
|
void paymentPopup(
|
||||||
BuildContext context, WalletsProfilesProvider walletViewProvider) {
|
BuildContext context, WalletsProfilesProvider walletViewProvider) {
|
||||||
// WalletsProfilesProvider _walletViewProvider =
|
// WalletsProfilesProvider _walletViewProvider =
|
||||||
|
|
Loading…
Reference in New Issue