From e98c753973d79f525ec092c650431482fff206c7 Mon Sep 17 00:00:00 2001
From: vjrj <vjrj@comunes.org>
Date: Sun, 3 Dec 2023 11:19:57 +0100
Subject: [PATCH] Use mempool always

---
 lib/g1/api.dart        | 7 ++-----
 lib/ui/pay_helper.dart | 8 +-------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/lib/g1/api.dart b/lib/g1/api.dart
index ec1135e5..86ab470f 100644
--- a/lib/g1/api.dart
+++ b/lib/g1/api.dart
@@ -565,10 +565,7 @@ Future<http.Response> _requestWithRetry(
 }
 
 Future<PayResult> pay(
-    {required String to,
-    required double amount,
-    String? comment,
-    bool useMempool = false}) async {
+    {required String to, required double amount, String? comment}) async {
   try {
     final SelectedGvaNode selected = getGvaNode();
 
@@ -584,7 +581,7 @@ Future<PayResult> pay(
           amount: amount,
           comment: comment ?? '',
           cesiumSeed: wallet.seed,
-          useMempool: useMempool,
+          useMempool: true,
           raiseException: true);
       logger('GVA replied with "$response"');
       return PayResult(message: response, node: selected);
diff --git a/lib/ui/pay_helper.dart b/lib/ui/pay_helper.dart
index 38931b84..d59a0b11 100644
--- a/lib/ui/pay_helper.dart
+++ b/lib/ui/pay_helper.dart
@@ -31,12 +31,9 @@ Future<bool> payWithRetry(
     required double amount,
     required String comment,
     bool isRetry = false,
-    bool useMempool = false,
     bool isMultiPayment = false,
     required bool isG1,
     required double currentUd}) async {
-  logger('Trying to pay state with useMempool: $useMempool');
-
   assert(amount > 0);
   bool hasPass = false;
   if (!SharedPreferencesHelper().isG1nkgoCard() &&
@@ -99,10 +96,7 @@ Future<bool> payWithRetry(
           return true;
         } else {
           final PayResult result = await pay(
-              to: contactPubKey,
-              comment: comment,
-              amount: convertedAmount,
-              useMempool: true);
+              to: contactPubKey, comment: comment, amount: convertedAmount);
 
           final Transaction pending = tx.copyWith(
               debugInfo:
-- 
GitLab