diff --git a/config/gdev_endpoints.json b/config/gdev_endpoints.json
index 90a332fafd821235eb2b7f49858b7cfed6e4e0f6..a64247a6e52987d0b421fdac173062ef84804c35 100644
--- a/config/gdev_endpoints.json
+++ b/config/gdev_endpoints.json
@@ -2,5 +2,4 @@
       "wss://gdev.librelois.fr/ws",
       "wss://gdev.1000i100.fr/ws",
       "wss://gdev.komun.org/ws"
-
 ]
diff --git a/lib/providers/substrate_sdk.dart b/lib/providers/substrate_sdk.dart
index d7a2a7eb5f46ccddbe0ea73500ff3c971334d3ae..dcd6d55c96a01bf3d5d4aa454525b105a1ffdc08 100644
--- a/lib/providers/substrate_sdk.dart
+++ b/lib/providers/substrate_sdk.dart
@@ -524,7 +524,7 @@ class SubstrateSdk with ChangeNotifier {
 
     if (idtyStatus != null) {
       final String _status = idtyStatus['status'];
-      log.d('Status $address: $_status');
+      // log.d('Status $address: $_status');
       return (_status);
     } else {
       return 'expired';
@@ -605,40 +605,28 @@ class SubstrateSdk with ChangeNotifier {
   }
 
   Future<Map<String, int>> certState(String from, String to) async {
-    // String from = await getMemberAddress();
+    Map<String, int> _result = {};
     if (from != to && await isMember(from)) {
-      Map<String, int> _result = {};
       final _certData = await getCertData(from, to);
       final _certMeta = await getCertMeta(from);
       final int _removableOn = _certData['removableOn'] ?? 0;
-      final int _renewableOn = _certData['renewableOn'] ?? 0;
       final int _nextIssuableOn = _certMeta['nextIssuableOn'] ?? 0;
-      //TODO: use _removableOn instead of _renewableOn
-      log.d(_renewableOn.toString() +
-          '\n' +
-          _removableOn.toString() +
-          '\n' +
-          _nextIssuableOn.toString());
-      if (_renewableOn != 0) {
-        final certRenewDuration = (_renewableOn - blocNumber) * 6;
+      final certRemovableDuration = (_removableOn - blocNumber) * 6;
+      const int renewDelay = 2 * 30 * 24 * 3600; // 2 months
+
+      if (certRemovableDuration >= renewDelay) {
+        final certRenewDuration = certRemovableDuration - renewDelay;
         _result.putIfAbsent('certRenewable', () => certRenewDuration);
-        return _result;
       } else if (_nextIssuableOn > blocNumber) {
         final certDelayDuration = (_nextIssuableOn - blocNumber) * 6;
         _result.putIfAbsent('certDelay', () => certDelayDuration);
-        return _result;
       } else {
         _result.putIfAbsent('canCert', () => 0);
-        return _result;
       }
     }
-    return {};
+    return _result;
   }
 
-  // Future<String> certState(String from, String to) async {
-  //   return '';
-  // }
-
   Future<Map> getCertMeta(String address) async {
     var idtyIndex = await sdk.webView!
         .evalJavascript('api.query.identity.identityIndexOf("$address")');
@@ -648,7 +636,7 @@ class SubstrateSdk with ChangeNotifier {
         '';
     // if (_certMeta['nextIssuableOn'] != 0) return {};
 
-    log.d(_certMeta);
+    // log.d(_certMeta);
     return _certMeta;
   }
 
diff --git a/pubspec.yaml b/pubspec.yaml
index 05b92cd8a0dbeb828dd267317303992fab249ea9..58f686211074677e451c700ec25892fb27921fe2 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -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+12
+version: 0.0.9+13
 
 environment:
   sdk: '>=2.12.0 <3.0.0'