Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ğecko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Ğecko
Commits
cf9f5577
Commit
cf9f5577
authored
1 year ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
fix: replace null value by high idtyindex for multiquery
parent
db13c4a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#34425
waiting for manual action
Stage: format
Stage: build_and_test
Stage: package
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/providers/substrate_sdk.dart
+6
-11
6 additions, 11 deletions
lib/providers/substrate_sdk.dart
with
6 additions
and
11 deletions
lib/providers/substrate_sdk.dart
+
6
−
11
View file @
cf9f5577
...
...
@@ -92,7 +92,7 @@ class SubstrateSdk with ChangeNotifier {
Future
_getStorage
(
String
call
)
async
{
try
{
log
.
d
(
call
);
//
log.d(call);
return
await
sdk
.
webView
!.
evalJavascript
(
'api.query.
$call
'
);
}
catch
(
e
)
{
log
.
e
(
"_getStorage error:
$e
"
);
...
...
@@ -148,8 +148,6 @@ class SubstrateSdk with ChangeNotifier {
String
jsonString
=
jsonEncode
(
addresses
);
return
List
<
int
?
>
.
from
(
await
_getStorage
(
'identity.identityIndexOf.multi(
$jsonString
)'
));
// .map((e) => e as int?)
// .toList() as List<int?>;
}
Future
<
List
<
int
>
?
>
getCertsCounter
(
String
address
)
async
{
...
...
@@ -395,17 +393,14 @@ class SubstrateSdk with ChangeNotifier {
// final walletOptions =
// Provider.of<WalletOptionsProvider>(homeContext, listen: false);
log
.
d
(
addresses
);
final
idtyIndexes
=
(
await
_getIdentityIndexOfMulti
(
addresses
));
// .map((dynamic e) => e as String)
// .toList();
log
.
d
(
idtyIndexes
);
final
jsonString
=
jsonEncode
(
idtyIndexes
);
final
idtyIndexes
=
await
_getIdentityIndexOfMulti
(
addresses
);
//FIXME: should not have to replace null values by 99999999
final
idtyIndexesFix
=
idtyIndexes
.
map
((
item
)
=
>
item
??
99999999
)
.
toList
();
final
jsonString
=
jsonEncode
(
idtyIndexesFix
);
final
List
idtyStatusList
=
await
_getStorage
(
'identity.identities.multi(
$jsonString
)'
);
log
.
d
(
idtyStatusList
);
List
<
IdtyStatus
>
resultStatus
=
[];
for
(
final
idtyStatus
in
idtyStatusList
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment