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
41b9db0d
Commit
41b9db0d
authored
2 years ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
Gecko is now pluggued to indexer v0.3.0 with g1 history data
parent
61d28e79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#17854
waiting for manual action
Stage: format
Stage: build_and_test
Stage: package
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/indexer_endpoints.json
+1
-0
1 addition, 0 deletions
config/indexer_endpoints.json
lib/models/queries_indexer.dart
+7
-6
7 additions, 6 deletions
lib/models/queries_indexer.dart
lib/providers/duniter_indexer.dart
+11
-10
11 additions, 10 deletions
lib/providers/duniter_indexer.dart
with
19 additions
and
16 deletions
config/indexer_endpoints.json
+
1
−
0
View file @
41b9db0d
[
[
"https://gdev-indexer.p2p.legal"
,
"https://idx.gdev.cgeek.fr"
,
"https://idx.gdev.cgeek.fr"
,
"https://duniter-indexer.coinduf.eu"
,
"https://duniter-indexer.coinduf.eu"
,
"http://192.168.1.72:8080"
"http://192.168.1.72:8080"
...
...
This diff is collapsed.
Click to expand it.
lib/models/queries_indexer.dart
+
7
−
6
View file @
41b9db0d
const
String
getNameByAddressQ
=
r''
'
const
String
getNameByAddressQ
=
r''
'
query (
$address
: String!) {
query (
$address
: String!) {
account_by_pk(
id
:
$address
) {
account_by_pk(
pubkey
:
$address
) {
identity {
identity {
name
name
}
}
pubkey
}
}
}
}
'''
;
'''
;
...
@@ -11,7 +12,7 @@ query ($address: String!) {
...
@@ -11,7 +12,7 @@ query ($address: String!) {
const
String
searchAddressByNameQ
=
r''
'
const
String
searchAddressByNameQ
=
r''
'
query (
$name
: String!) {
query (
$name
: String!) {
search_identity(args: {name:
$name
}) {
search_identity(args: {name:
$name
}) {
id
pubkey
name
name
}
}
}
}
...
@@ -21,8 +22,8 @@ const String getHistoryByAddressQ = r'''
...
@@ -21,8 +22,8 @@ const String getHistoryByAddressQ = r'''
query (
$address
: String!,
$number
: Int!,
$cursor
: String) {
query (
$address
: String!,
$number
: Int!,
$cursor
: String) {
transaction_connection(where:
transaction_connection(where:
{_or: [
{_or: [
{issuer_
id
: {_eq:
$address
}},
{issuer_
pubkey
: {_eq:
$address
}},
{receiver_
id
: {_eq:
$address
}}
{receiver_
pubkey
: {_eq:
$address
}}
]},
]},
order_by: {created_at: desc},
order_by: {created_at: desc},
first:
$number
,
first:
$number
,
...
@@ -31,8 +32,8 @@ query ($address: String!, $number: Int!, $cursor: String) {
...
@@ -31,8 +32,8 @@ query ($address: String!, $number: Int!, $cursor: String) {
node {
node {
amount
amount
created_at
created_at
issuer_
id
issuer_
pubkey
receiver_
id
receiver_
pubkey
issuer {
issuer {
identity {
identity {
name
name
...
...
This diff is collapsed.
Click to expand it.
lib/providers/duniter_indexer.dart
+
11
−
10
View file @
41b9db0d
...
@@ -301,12 +301,12 @@ class DuniterIndexer with ChangeNotifier {
...
@@ -301,12 +301,12 @@ class DuniterIndexer with ChangeNotifier {
Padding
(
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
5
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
5
),
child:
ListTile
(
child:
ListTile
(
key:
keySearchResult
(
profile
[
'
id
'
]),
key:
keySearchResult
(
profile
[
'
pubkey
'
]),
horizontalTitleGap:
40
,
horizontalTitleGap:
40
,
contentPadding:
const
EdgeInsets
.
all
(
5
),
contentPadding:
const
EdgeInsets
.
all
(
5
),
leading:
cesiumPlusProvider
.
defaultAvatar
(
avatarSize
),
leading:
cesiumPlusProvider
.
defaultAvatar
(
avatarSize
),
title:
Row
(
children:
<
Widget
>[
title:
Row
(
children:
<
Widget
>[
Text
(
getShortPubkey
(
profile
[
'
id
'
]),
Text
(
getShortPubkey
(
profile
[
'
pubkey
'
]),
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
18
,
fontSize:
18
,
fontFamily:
'Monospace'
,
fontFamily:
'Monospace'
,
...
@@ -321,7 +321,7 @@ class DuniterIndexer with ChangeNotifier {
...
@@ -321,7 +321,7 @@ class DuniterIndexer with ChangeNotifier {
Column
(
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
balance
(
context
,
profile
[
'
id
'
],
16
),
balance
(
context
,
profile
[
'
pubkey
'
],
16
),
]),
]),
]),
]),
),
),
...
@@ -337,14 +337,15 @@ class DuniterIndexer with ChangeNotifier {
...
@@ -337,14 +337,15 @@ class DuniterIndexer with ChangeNotifier {
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
{
MaterialPageRoute
(
builder:
(
context
)
{
walletsProfiles
.
address
=
profile
[
'
id
'
];
walletsProfiles
.
address
=
profile
[
'
pubkey
'
];
return
WalletViewScreen
(
return
WalletViewScreen
(
address:
profile
[
'
id
'
],
address:
profile
[
'
pubkey
'
],
username:
g1WalletsBox
username:
g1WalletsBox
.
get
(
profile
[
'
id
'
])
.
get
(
profile
[
'
pubkey
'
])
?.
id
?.
id
?.
username
,
?.
username
,
avatar:
g1WalletsBox
.
get
(
profile
[
'id'
])
?.
avatar
,
avatar:
g1WalletsBox
.
get
(
profile
[
'pubkey'
])
?.
avatar
,
);
);
}),
}),
);
);
...
@@ -363,7 +364,7 @@ class DuniterIndexer with ChangeNotifier {
...
@@ -363,7 +364,7 @@ class DuniterIndexer with ChangeNotifier {
for
(
final
trans
in
blockchainTX
)
{
for
(
final
trans
in
blockchainTX
)
{
final
transaction
=
trans
[
'node'
];
final
transaction
=
trans
[
'node'
];
final
direction
=
final
direction
=
transaction
[
'issuer_
id
'
]
!=
pubkey
?
'RECEIVED'
:
'SENT'
;
transaction
[
'issuer_
pubkey
'
]
!=
pubkey
?
'RECEIVED'
:
'SENT'
;
transBC
.
add
(
i
);
transBC
.
add
(
i
);
transBC
[
i
]
=
[];
transBC
[
i
]
=
[];
...
@@ -371,10 +372,10 @@ class DuniterIndexer with ChangeNotifier {
...
@@ -371,10 +372,10 @@ class DuniterIndexer with ChangeNotifier {
final
int
amountBrut
=
transaction
[
'amount'
];
final
int
amountBrut
=
transaction
[
'amount'
];
final
double
amount
=
removeDecimalZero
(
amountBrut
/
100
);
final
double
amount
=
removeDecimalZero
(
amountBrut
/
100
);
if
(
direction
==
"RECEIVED"
)
{
if
(
direction
==
"RECEIVED"
)
{
transBC
[
i
]
.
add
(
transaction
[
'issuer_
id
'
]);
transBC
[
i
]
.
add
(
transaction
[
'issuer_
pubkey
'
]);
transBC
[
i
]
.
add
(
transaction
[
'issuer'
][
'identity'
]
?
[
'name'
]
??
''
);
transBC
[
i
]
.
add
(
transaction
[
'issuer'
][
'identity'
]
?
[
'name'
]
??
''
);
}
else
if
(
direction
==
"SENT"
)
{
}
else
if
(
direction
==
"SENT"
)
{
transBC
[
i
]
.
add
(
transaction
[
'receiver_
id
'
]);
transBC
[
i
]
.
add
(
transaction
[
'receiver_
pubkey
'
]);
transBC
[
i
]
.
add
(
transaction
[
'receiver'
][
'identity'
]
?
[
'name'
]
??
''
);
transBC
[
i
]
.
add
(
transaction
[
'receiver'
][
'identity'
]
?
[
'name'
]
??
''
);
}
}
transBC
[
i
]
.
add
(
amount
);
transBC
[
i
]
.
add
(
amount
);
...
...
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