Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ginkgo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vjrj
ginkgo
Commits
e98c7539
Commit
e98c7539
authored
1 year ago
by
vjrj
Browse files
Options
Downloads
Patches
Plain Diff
Use mempool always
parent
6a82a0a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/g1/api.dart
+2
-5
2 additions, 5 deletions
lib/g1/api.dart
lib/ui/pay_helper.dart
+1
-7
1 addition, 7 deletions
lib/ui/pay_helper.dart
with
3 additions
and
12 deletions
lib/g1/api.dart
+
2
−
5
View file @
e98c7539
...
@@ -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);
...
...
This diff is collapsed.
Click to expand it.
lib/ui/pay_helper.dart
+
1
−
7
View file @
e98c7539
...
@@ -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:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment