diff --git a/lib/main.dart b/lib/main.dart index 63c9be467bba575982e841f1d432c800068c3b9f..3f348e40bbb445539d256047d78cd9fa0da518c5 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -80,7 +80,8 @@ Future<void> main() async { } // log.d(await configBox.get('endpoint')); - const indexerEndpoint = "http://192.168.1.72:8080/v1/graphql"; + // const indexerEndpoint = "http://192.168.1.72:8080/v1/graphql"; + const indexerEndpoint = "https://duniter-indexer.coinduf.eu/v1/graphql"; HttpOverrides.global = MyHttpOverrides(); diff --git a/lib/models/queries_indexer.dart b/lib/models/queries_indexer.dart index 439cd868b21c50ca242b18e3b54e8d82e617458a..a59aa28198db46580c41da0aa169973a45fa6504 100644 --- a/lib/models/queries_indexer.dart +++ b/lib/models/queries_indexer.dart @@ -7,3 +7,72 @@ query ($address: String!) { } } '''; + +const String searchAddressByNameQ = r''' +query ($name: String!) { + search_identity(args: {name: $name}) { + id + name + } +} +'''; + +const String getHistoryByAddressQ = r''' +query ($address: String!) { + account_by_pk(id: "5CQ8T4qpbYJq7uVsxGPQ5q2df7x3Wa4aRY6HUWMBYjfLZhnn") { + transactions_issued { + receiver_id + amount + created_at + created_on + } + transactions_received { + issuer_id + amount + created_at + created_on + } + } +} +'''; + +const String getHistoryByAddressQ2 = r''' +query ($address: String!) { + { + transaction(where: {_or: [{issuer_id: {_eq: $address}}, + {receiver_id: {_eq: $address}}]}, order_by: {created_at: desc}) + { + amount + created_at + issuer_id + receiver_id + } + } +} +'''; + +const String getHistoryByAddressQ3 = r''' +query ($address: String!) { + transaction_connection(where: + {_or: [ + {issuer_id: {_eq: $address}}, + {receiver_id: {_eq: $address}} + ]}, + order_by: {created_at: desc}) { + edges { + node { + amount + created_at + issuer_id + receiver_id + } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } +} +'''; diff --git a/lib/providers/wallet_options.dart b/lib/providers/wallet_options.dart index 547483684c764544430470e876baeeeb1317e330..748f6ab237ba31fea9123a58bc2d5f18aa23f032 100644 --- a/lib/providers/wallet_options.dart +++ b/lib/providers/wallet_options.dart @@ -147,6 +147,9 @@ class WalletOptionsProvider with ChangeNotifier { ); } + log.d('bbbbbbbbbbbb: ' + + DateTime.parse("2022-06-13T16:51:24.001+00:00").toString()); + return Consumer<SubstrateSdk>(builder: (context, _sub, _) { return FutureBuilder( future: _sub.idtyStatus(address), diff --git a/pubspec.yaml b/pubspec.yaml index fb66f41b6ef00cb6c595781d28d940d198b1947b..a74dd6853ffa3c5f85378839d4aeba25c80cc1d5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ description: Pay with G1. # pub.dev using `pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 0.0.8+9 +version: 0.0.9+1 environment: sdk: '>=2.12.0 <3.0.0'