@@ -357,7 +357,8 @@ class Client {
357357 Uri .parse (
358358 '${_serviceUrls [_network .toString ()]}/transactionfunding_service/fund_transaction' ),
359359 headers: {'Content-Type' : 'application/json' },
360- body: jsonEncode ({'transaction' : fundedTransaction.toEnvelopeXdrBase64 ()}),
360+ body: jsonEncode (
361+ {'transaction' : fundedTransaction.toEnvelopeXdrBase64 ()}),
361362 );
362363
363364 print (response.body);
@@ -366,8 +367,7 @@ class Client {
366367 }
367368 }
368369
369- Future <List <ITransaction >> getTransactions (
370- {String ? assetCodeFilter}) async {
370+ Future <List <ITransaction >> getTransactions ({String ? assetCodeFilter}) async {
371371 Page <OperationResponse > payments = await _sdk.payments
372372 .forAccount (accountId)
373373 .order (RequestBuilderOrder .DESC )
@@ -377,22 +377,23 @@ class Client {
377377 if (payments.records != null && payments.records! .isNotEmpty) {
378378 for (OperationResponse response in payments.records! ) {
379379 if (response is PaymentOperationResponse ) {
380- final memoText = await this .getMemoText (response.links? .transaction? .toJson ()["href" ]);
380+ final memoText = await this
381+ .getMemoText (response.links? .transaction? .toJson ()["href" ]);
381382 String assetCode = response.assetCode ?? 'XLM' ;
382383 if (assetCodeFilter == null || assetCode == assetCodeFilter) {
383384 final details = PaymentTransaction (
384- hash: response.transactionHash! ,
385- from: response.from! .accountId,
386- to: response.to! .accountId,
387- asset: response.assetCode.toString (),
388- amount: response.amount! ,
389- type: response.to! .accountId == this .accountId
390- ? TransactionType .Receive
391- : TransactionType .Payment ,
392- status: response.transactionSuccessful! ,
393- date: DateTime .parse (response.createdAt! ).toLocal ().toString (),
394- memo: memoText);
395-
385+ hash: response.transactionHash! ,
386+ from: response.from! .accountId,
387+ to: response.to! .accountId,
388+ asset: response.assetCode.toString (),
389+ amount: response.amount! ,
390+ type: response.to! .accountId == this .accountId
391+ ? TransactionType .Receive
392+ : TransactionType .Payment ,
393+ status: response.transactionSuccessful! ,
394+ date: DateTime .parse (response.createdAt! ).toLocal ().toString (),
395+ memo: memoText);
396+
396397 transactionDetails.add (details);
397398 }
398399 } else {
@@ -458,7 +459,8 @@ class Client {
458459 Future <String > getMemoText (String url) async {
459460 try {
460461 final response = await http.get (
461- Uri .parse (url), headers: {'Content-Type' : 'application/json' },
462+ Uri .parse (url),
463+ headers: {'Content-Type' : 'application/json' },
462464 );
463465 final body = jsonDecode (response.body);
464466 final memoText = body['memo' ] ?? "" ;
0 commit comments