Skip to content
Snippets Groups Projects
Commit e98c7539 authored by vjrj's avatar vjrj
Browse files

Use mempool always

parent 6a82a0a7
No related branches found
No related tags found
No related merge requests found
...@@ -565,10 +565,7 @@ Future<http.Response> _requestWithRetry( ...@@ -565,10 +565,7 @@ Future<http.Response> _requestWithRetry(
} }
Future<PayResult> pay( Future<PayResult> pay(
{required String to, {required String to, required double amount, String? comment}) async {
required double amount,
String? comment,
bool useMempool = false}) async {
try { try {
final SelectedGvaNode selected = getGvaNode(); final SelectedGvaNode selected = getGvaNode();
...@@ -584,7 +581,7 @@ Future<PayResult> pay( ...@@ -584,7 +581,7 @@ Future<PayResult> pay(
amount: amount, amount: amount,
comment: comment ?? '', comment: comment ?? '',
cesiumSeed: wallet.seed, cesiumSeed: wallet.seed,
useMempool: useMempool, useMempool: true,
raiseException: true); raiseException: true);
logger('GVA replied with "$response"'); logger('GVA replied with "$response"');
return PayResult(message: response, node: selected); return PayResult(message: response, node: selected);
......
...@@ -31,12 +31,9 @@ Future<bool> payWithRetry( ...@@ -31,12 +31,9 @@ Future<bool> payWithRetry(
required double amount, required double amount,
required String comment, required String comment,
bool isRetry = false, bool isRetry = false,
bool useMempool = false,
bool isMultiPayment = false, bool isMultiPayment = false,
required bool isG1, required bool isG1,
required double currentUd}) async { required double currentUd}) async {
logger('Trying to pay state with useMempool: $useMempool');
assert(amount > 0); assert(amount > 0);
bool hasPass = false; bool hasPass = false;
if (!SharedPreferencesHelper().isG1nkgoCard() && if (!SharedPreferencesHelper().isG1nkgoCard() &&
...@@ -99,10 +96,7 @@ Future<bool> payWithRetry( ...@@ -99,10 +96,7 @@ Future<bool> payWithRetry(
return true; return true;
} else { } else {
final PayResult result = await pay( final PayResult result = await pay(
to: contactPubKey, to: contactPubKey, comment: comment, amount: convertedAmount);
comment: comment,
amount: convertedAmount,
useMempool: true);
final Transaction pending = tx.copyWith( final Transaction pending = tx.copyWith(
debugInfo: debugInfo:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment