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
c279066a
Commit
c279066a
authored
4 years ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
Fix transaction amount parsing for multi-receivers
parent
231a82a4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/models/history.dart
+14
-4
14 additions, 4 deletions
lib/models/history.dart
lib/screens/history.dart
+2
-1
2 additions, 1 deletion
lib/screens/history.dart
with
16 additions
and
5 deletions
lib/models/history.dart
+
14
−
4
View file @
c279066a
...
...
@@ -63,7 +63,9 @@ class HistoryProvider with ChangeNotifier {
return
''
;
}
List
parseHistory
(
txs
)
{
// Boris: JE6mkuzSpT3ePciCPRTpuMT9fqPUVVLJz2618d33p7tn
List
parseHistory
(
txs
,
_pubkey
)
{
var
transBC
=
[];
int
i
=
0
;
...
...
@@ -73,7 +75,15 @@ class HistoryProvider with ChangeNotifier {
for
(
final
trans
in
txs
)
{
var
direction
=
trans
[
'direction'
];
final
transaction
=
trans
[
'node'
];
var
output
=
transaction
[
'outputs'
][
0
];
var
output
;
for
(
String
line
in
transaction
[
'outputs'
])
{
if
(
line
.
contains
(
_pubkey
))
{
output
=
line
;
}
}
if
(
output
==
null
)
{
continue
;
}
transBC
.
add
(
i
);
transBC
[
i
]
=
[];
...
...
@@ -108,7 +118,7 @@ class HistoryProvider with ChangeNotifier {
return
transBC
;
}
FetchMoreOptions
checkQueryResult
(
result
,
opts
)
{
FetchMoreOptions
checkQueryResult
(
result
,
opts
,
_pubkey
)
{
final
List
<
dynamic
>
blockchainTX
=
(
result
.
data
[
'txsHistoryBc'
][
'both'
][
'edges'
]
as
List
<
dynamic
>);
...
...
@@ -136,7 +146,7 @@ class HistoryProvider with ChangeNotifier {
print
(
"###### DEBUG H Parse blockchainTX list. Cursor:
$fetchMoreCursor
######"
);
if
(
fetchMoreCursor
!=
null
)
{
transBC
=
parseHistory
(
blockchainTX
);
transBC
=
parseHistory
(
blockchainTX
,
_pubkey
);
isTheEnd
=
false
;
}
else
{
print
(
"###### DEBUG H - Début de l'historique"
);
...
...
This diff is collapsed.
Click to expand it.
lib/screens/history.dart
+
2
−
1
View file @
c279066a
...
...
@@ -126,7 +126,8 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
final
num
balance
=
_historyProvider
.
removeDecimalZero
(
result
.
data
[
'balance'
][
'amount'
]
/
100
);
opts
=
_historyProvider
.
checkQueryResult
(
result
,
opts
);
opts
=
_historyProvider
.
checkQueryResult
(
result
,
opts
,
_outputPubkey
.
text
);
// Build history list
// _cesiumPlusProvider.cesiumName.text = "NAMEE";
...
...
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