Skip to content
Snippets Groups Projects
Commit 21125500 authored by poka's avatar poka
Browse files

use mempool utxo for transactions

parent 1dc23c59
No related branches found
No related tags found
1 merge request!57use mempool utxo for transactions
...@@ -568,7 +568,7 @@ Future<PayResult> pay( ...@@ -568,7 +568,7 @@ Future<PayResult> pay(
{required String to, {required String to,
required double amount, required double amount,
String? comment, String? comment,
bool? useMempool}) async { bool useMempool = false}) async {
try { try {
final SelectedGvaNode selected = getGvaNode(); final SelectedGvaNode selected = getGvaNode();
...@@ -584,7 +584,7 @@ Future<PayResult> pay( ...@@ -584,7 +584,7 @@ Future<PayResult> pay(
amount: amount, amount: amount,
comment: comment ?? '', comment: comment ?? '',
cesiumSeed: wallet.seed, cesiumSeed: wallet.seed,
useMempool: useMempool ?? false, useMempool: useMempool,
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);
......
...@@ -88,7 +88,10 @@ Future<void> payWithRetry( ...@@ -88,7 +88,10 @@ Future<void> payWithRetry(
return; return;
} else { } else {
final PayResult result = await pay( final PayResult result = await pay(
to: contactPubKey, comment: comment, amount: convertedAmount); to: contactPubKey,
comment: comment,
amount: convertedAmount,
useMempool: true);
final Transaction pending = tx.copyWith( final Transaction pending = tx.copyWith(
debugInfo: debugInfo:
'Node used: ${result.node != null ? result.node!.url : 'unknown'}'); 'Node used: ${result.node != null ? result.node!.url : 'unknown'}');
......
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