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
2526f382
Commit
2526f382
authored
2 years ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
type and lock balance computing
parent
2677cb8e
No related branches found
No related tags found
1 merge request
!26
Features gdev2
Pipeline
#16703
failed
2 years ago
Stage: format
Stage: build_and_test
Stage: package
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/providers/substrate_sdk.dart
+9
-5
9 additions, 5 deletions
lib/providers/substrate_sdk.dart
with
9 additions
and
5 deletions
lib/providers/substrate_sdk.dart
+
9
−
5
View file @
2526f382
...
...
@@ -269,11 +269,13 @@ class SubstrateSdk with ChangeNotifier {
// }
Future
<
double
>
getBalance
(
String
address
)
async
{
final
balanceGlobal
=
await
getStorage
(
'system.account("
$address
")'
);
// Get onchain storage values
final
idtyIndex
=
await
getStorage
(
'identity.identityIndexOf("
$address
")'
);
final
idtyData
=
await
getStorage
(
'identity.identities(
$idtyIndex
)'
);
final
Map
balanceGlobal
=
await
getStorage
(
'system.account("
$address
")'
);
final
int
?
idtyIndex
=
await
getStorage
(
'identity.identityIndexOf("
$address
")'
);
final
Map
?
idtyData
=
idtyIndex
==
null
?
null
:
await
getStorage
(
'identity.identities(
$idtyIndex
)'
);
final
int
currentUdIndex
=
int
.
parse
(
await
getStorage
(
'universalDividend.currentUdIndex()'
));
final
List
pastReevals
=
...
...
@@ -299,7 +301,9 @@ class SubstrateSdk with ChangeNotifier {
int
currentUdIndex
,
int
firstEligibleUd
,
List
pastReevals
)
{
int
totalAmount
=
0
;
for
(
var
reval
in
pastReevals
.
reversed
)
{
if
(
firstEligibleUd
==
0
)
return
0
;
for
(
final
List
reval
in
pastReevals
.
reversed
)
{
final
int
revalNbr
=
reval
[
0
];
final
int
revalValue
=
reval
[
1
];
...
...
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