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

fix: idtyIndex is nullable

parent a13d1917
No related branches found
No related tags found
No related merge requests found
Pipeline #34419 waiting for manual action
......@@ -169,7 +169,7 @@ class SubstrateSdk with ChangeNotifier {
final idtyIndexFrom = await _getIdentityIndexOf(from);
final idtyIndexTo = await _getIdentityIndexOf(to);
if (idtyIndexFrom == 0 || idtyIndexTo == 0) return 0;
if (idtyIndexFrom == null || idtyIndexTo == null) return 0;
final List certData =
await _getStorage('cert.certsByReceiver($idtyIndexTo)') ?? [];
......@@ -362,7 +362,7 @@ class SubstrateSdk with ChangeNotifier {
// Provider.of<WalletOptionsProvider>(homeContext, listen: false);
var idtyIndex = await _getIdentityIndexOf(address);
if (idtyIndex == 0) return [];
if (idtyIndex == null) return [];
final Map? idtyData = await _getStorage('identity.identities($idtyIndex)');
if (idtyData == null || idtyData['oldOwnerKey'] == null) return [];
......
......@@ -194,7 +194,7 @@ class WalletViewScreen extends StatelessWidget {
}
}
final toStatus = snapshot.data!['toStatus'] ?? 0;
final toStatus = snapshot.data!['toStatus'];
return Visibility(
visible: (snapshot.data != {}),
......@@ -272,7 +272,7 @@ class WalletViewScreen extends StatelessWidget {
),
const SizedBox(height: 9),
Text(
toStatus == 0
toStatus == null
? "certify".tr()
: "createIdentity".tr(),
textAlign: TextAlign.center,
......
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