forked from axiom-team/gecko
fix: bad rendering canCert if identity is created
This commit is contained in:
parent
92992c2f69
commit
3100dc5126
|
@ -231,6 +231,8 @@ class SubstrateSdk with ChangeNotifier {
|
|||
|
||||
Future<Map<String, int>> certState(String from, String to) async {
|
||||
Map<String, int> result = {};
|
||||
final toStatus = await idtyStatus(to);
|
||||
|
||||
if (from != to && await isMemberGet(from)) {
|
||||
final removableOn = await getCertValidityPeriod(from, to);
|
||||
final certMeta = await getCertMeta(from);
|
||||
|
@ -244,15 +246,14 @@ class SubstrateSdk with ChangeNotifier {
|
|||
} else if (nextIssuableOn > blocNumber) {
|
||||
final certDelayDuration = (nextIssuableOn - blocNumber) * 6;
|
||||
result.putIfAbsent('certDelay', () => certDelayDuration);
|
||||
} else if (toStatus == 'Created') {
|
||||
result.putIfAbsent('toStatus', () => 1);
|
||||
} else {
|
||||
result.putIfAbsent('canCert', () => 0);
|
||||
}
|
||||
}
|
||||
|
||||
final toStatus = await idtyStatus(to);
|
||||
// log.d('certMeta: $toStatus');
|
||||
|
||||
if (toStatus == 'Created') result.putIfAbsent('toStatus', () => 1);
|
||||
// if (toStatus == 'Created') result.putIfAbsent('toStatus', () => 1);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -138,10 +138,9 @@ class WalletsProfilesProvider with ChangeNotifier {
|
|||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
||||
// SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
bool isAccountExist = balanceCache[address] != 0;
|
||||
|
||||
return Stack(children: <Widget>[
|
||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
bool isAccountExist = balanceCache[address] != 0;
|
||||
return Container(
|
||||
height: 180,
|
||||
decoration: BoxDecoration(
|
||||
|
|
|
@ -270,8 +270,8 @@ class WalletViewScreen extends StatelessWidget {
|
|||
fontSize: buttonFontSize,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
]),
|
||||
if (toStatus == 1)
|
||||
])
|
||||
else if (toStatus == 1)
|
||||
waitToCert('mustConfirmHisIdentity', duration)
|
||||
else if (snapshot.data!['certRenewable'] != null &&
|
||||
duration != 'seconds'.tr(args: ['0']))
|
||||
|
|
|
@ -5,7 +5,7 @@ description: Pay with G1.
|
|||
# pub.dev using `pub publish`. This is preferred for private packages.
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
version: 0.0.9+24
|
||||
version: 0.0.10+26
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
|
|
Loading…
Reference in New Issue