Skip to content
Snippets Groups Projects
Commit d8f3936e authored by poka's avatar poka
Browse files

fix: ignore certs state if dest identity is null

parent ef3ae9db
No related branches found
No related tags found
No related merge requests found
Pipeline #16666 waiting for manual action
......@@ -259,6 +259,8 @@ class SubstrateSdk with ChangeNotifier {
final idtyIndexTo = await sdk.webView!
.evalJavascript('api.query.identity.identityIndexOf("$to")');
if (idtyIndexFrom == null || idtyIndexTo == null) return {};
final certData = await sdk.webView!.evalJavascript(
'api.query.cert.storageCertsByIssuer($idtyIndexFrom, $idtyIndexTo)') ??
'';
......
......@@ -137,7 +137,7 @@ class WalletOptionsProvider with ChangeNotifier {
_showText(String text,
[double size = 18, bool bold = false, bool smooth = true]) {
log.d(text);
log.d('$address $text');
return AnimatedFadeOutIn<String>(
data: text,
duration: Duration(milliseconds: smooth ? 200 : 0),
......
......@@ -80,7 +80,6 @@ class SearchResultScreen extends StatelessWidget {
future: searchProvider.searchAddress(),
builder: (context, AsyncSnapshot<List?> snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
log.d(snapshot.data);
if (snapshot.data?.isEmpty ?? true) {
return duniterIndexer.searchIdentity(
context, searchProvider.searchController.text);
......
......@@ -127,7 +127,6 @@ class WalletViewScreen extends StatelessWidget {
future: sub.certState(defaultWallet.address!,
pubkey!), // .canCertify(_defaultWallet.address!, pubkey!),
builder: (context, AsyncSnapshot<Map<String, int>> snapshot) {
// log.d(snapshot.data);
if (snapshot.data == null) return const SizedBox();
String duration = '';
if (snapshot.data!['certDelay'] != null ||
......@@ -162,6 +161,7 @@ class WalletViewScreen extends StatelessWidget {
duration = 'months'.tr(args: [months.toString()]);
}
}
return Visibility(
visible: (snapshot.data != {}),
child: Column(children: <Widget>[
......@@ -175,7 +175,7 @@ class WalletViewScreen extends StatelessWidget {
color:
const Color(0xffFFD58D), // button color
child: InkWell(
key: const Key('copyKey'),
key: const Key('certify'),
splashColor: orangeC, // inkwell color
child: const Padding(
padding: EdgeInsets.only(bottom: 0),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment