Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ğecko
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
clients
Ğecko
Commits
433452dc
Commit
433452dc
authored
1 year ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
fix: bad display on wallet choice dropdown on pay popup
parent
e47211f1
No related branches found
No related tags found
No related merge requests found
Pipeline
#34308
waiting for manual action
Stage: format
Stage: build_and_test
Stage: package
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/screens/transaction_in_progress.dart
+2
-3
2 additions, 3 deletions
lib/screens/transaction_in_progress.dart
lib/widgets/name_by_address.dart
+5
-5
5 additions, 5 deletions
lib/widgets/name_by_address.dart
lib/widgets/payment_popup.dart
+63
-57
63 additions, 57 deletions
lib/widgets/payment_popup.dart
with
70 additions
and
65 deletions
lib/screens/transaction_in_progress.dart
+
2
−
3
View file @
433452dc
...
...
@@ -168,7 +168,7 @@ class TransactionInProgress extends StatelessWidget {
onWillPop:
()
{
sub
.
transactionStatus
=
''
;
Navigator
.
pop
(
context
);
if
(
transType
==
'pay'
||
transType
==
'identityMigration'
)
{
if
(
transType
==
'identityMigration'
)
{
Navigator
.
pop
(
context
);
}
return
Future
<
bool
>
.
value
(
true
);
...
...
@@ -285,8 +285,7 @@ class TransactionInProgress extends StatelessWidget {
onPressed:
()
{
Navigator
.
pop
(
context
);
sub
.
transactionStatus
=
''
;
if
(
transType
==
'pay'
||
transType
==
'identityMigration'
)
{
if
(
transType
==
'identityMigration'
)
{
Navigator
.
pop
(
context
);
}
},
...
...
This diff is collapsed.
Click to expand it.
lib/widgets/name_by_address.dart
+
5
−
5
View file @
433452dc
...
...
@@ -33,6 +33,10 @@ class NameByAddress extends StatelessWidget {
return
WalletName
(
wallet:
wallet
,
size:
size
,
color:
color
);
}
// if (g1WalletsBox.get(wallet.address)?.username != null) {
// return Text(g1WalletsBox.get(wallet.address)!.username!);
// }
final
httpLink
=
HttpLink
(
'
$indexerEndpoint
/v1/graphql'
,
);
...
...
@@ -47,12 +51,10 @@ class NameByAddress extends StatelessWidget {
client:
client
,
child:
Query
(
options:
QueryOptions
(
document:
gql
(
getNameByAddressQ
),
// this is the query string you just created
document:
gql
(
getNameByAddressQ
),
variables:
{
'address'
:
wallet
.
address
,
},
// pollInterval: const Duration(seconds: 10),
),
builder:
(
QueryResult
result
,
{
VoidCallback
?
refetch
,
FetchMore
?
fetchMore
})
{
...
...
@@ -76,8 +78,6 @@ class NameByAddress extends StatelessWidget {
username:
duniterIndexer
.
walletNameIndexer
[
wallet
.
address
]));
// log.d(g1WalletsBox.toMap().values.first.username);
if
(
duniterIndexer
.
walletNameIndexer
[
wallet
.
address
]
==
null
)
{
return
WalletName
(
wallet:
wallet
,
size:
size
,
color:
color
);
}
...
...
This diff is collapsed.
Click to expand it.
lib/widgets/payment_popup.dart
+
63
−
57
View file @
433452dc
...
...
@@ -13,6 +13,7 @@ import 'package:gecko/providers/wallets_profiles.dart';
import
'package:gecko/screens/myWallets/unlocking_wallet.dart'
;
import
'package:gecko/screens/transaction_in_progress.dart'
;
import
'package:gecko/widgets/balance.dart'
;
import
'package:gecko/widgets/name_by_address.dart'
;
import
'package:provider/provider.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
...
...
@@ -66,6 +67,8 @@ void paymentPopup(BuildContext context, String toAddress, String username) {
}
myWalletProvider
.
readAllWallets
();
myWalletProvider
.
listWallets
.
sort
((
a
,
b
)
=
>
a
.
derivation
!.
compareTo
(
b
.
derivation
!
));
log
.
d
(
myWalletProvider
.
listWallets
);
showModalBottomSheet
<
void
>(
...
...
@@ -149,65 +152,68 @@ void paymentPopup(BuildContext context, String toAddress, String username) {
const
SizedBox
(
height:
10
),
Consumer
<
SubstrateSdk
>(
builder:
(
context
,
sub
,
_
)
{
return
DropdownButton
(
dropdownColor:
const
Color
(
0xffffeed1
),
elevation:
12
,
key:
dropdownKey
,
value:
defaultWallet
,
onTap:
()
{
FocusScope
.
of
(
context
)
.
requestFocus
(
amountFocus
);
},
selectedItemBuilder:
(
_
)
{
return
myWalletProvider
.
listWallets
dropdownColor:
const
Color
(
0xffffeed1
),
elevation:
12
,
key:
dropdownKey
,
value:
defaultWallet
,
menuMaxHeight:
300
,
onTap:
()
{
FocusScope
.
of
(
context
)
.
requestFocus
(
amountFocus
);
},
selectedItemBuilder:
(
_
)
{
return
myWalletProvider
.
listWallets
.
map
((
WalletData
wallet
)
{
return
Container
(
width:
408
,
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Colors
.
blueAccent
.
shade200
,
width:
2
),
borderRadius:
const
BorderRadius
.
all
(
Radius
.
circular
(
10.0
)),
),
padding:
const
EdgeInsets
.
all
(
10
),
child:
Visibility
(
visible:
wallet
.
address
==
defaultWallet
.
address
,
child:
Row
(
children:
[
NameByAddress
(
wallet:
wallet
,
fontStyle:
FontStyle
.
normal
),
const
Spacer
(),
Balance
(
address:
wallet
.
address
,
size:
20
),
]),
),
);
})
.
toList
();
},
onChanged:
(
WalletData
?
newSelectedWallet
)
async
{
defaultWallet
=
newSelectedWallet
!
;
await
sub
.
setCurrentWallet
(
newSelectedWallet
);
sub
.
reload
();
amountFocus
.
requestFocus
();
setState
(()
{});
},
items:
myWalletProvider
.
listWallets
.
map
((
WalletData
wallet
)
{
return
Container
(
width:
408
,
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Colors
.
blueAccent
.
shade200
,
width:
2
),
borderRadius:
const
BorderRadius
.
all
(
Radius
.
circular
(
10.0
)),
return
DropdownMenuItem
(
value:
wallet
,
child:
Container
(
color:
const
Color
(
0xffffeed1
),
width:
408
,
height:
80
,
padding:
const
EdgeInsets
.
all
(
10
),
child:
Row
(
children:
[
NameByAddress
(
wallet:
wallet
,
fontStyle:
FontStyle
.
normal
),
const
Spacer
(),
Balance
(
address:
wallet
.
address
,
size:
20
),
]),
),
padding:
const
EdgeInsets
.
all
(
10
),
child:
Row
(
children:
[
Text
(
g1WalletsBox
.
get
(
wallet
.
address
)
?.
username
??
wallet
.
name
!
),
const
Spacer
(),
Balance
(
address:
wallet
.
address
,
size:
20
),
]),
);
})
.
toList
();
},
onChanged:
(
WalletData
?
newSelectedWallet
)
async
{
defaultWallet
=
newSelectedWallet
!
;
await
sub
.
setCurrentWallet
(
newSelectedWallet
);
sub
.
reload
();
amountFocus
.
requestFocus
();
setState
(()
{});
},
items:
myWalletProvider
.
listWallets
.
map
((
WalletData
wallet
)
{
return
DropdownMenuItem
(
value:
wallet
,
child:
Container
(
color:
const
Color
(
0xffffeed1
),
width:
408
,
height:
80
,
padding:
const
EdgeInsets
.
all
(
10
),
child:
Row
(
children:
[
Text
(
g1WalletsBox
.
get
(
wallet
.
address
)
?.
username
??
wallet
.
name
!
),
const
Spacer
(),
Balance
(
address:
wallet
.
address
,
size:
20
),
]),
),
);
})
.
toList
(),
);
})
.
toList
());
}),
const
SizedBox
(
height:
12
),
Row
(
...
...
@@ -285,6 +291,7 @@ void paymentPopup(BuildContext context, String toAddress, String username) {
focusNode:
amountFocus
,
maxLines:
1
,
textAlign:
TextAlign
.
center
,
autocorrect:
false
,
keyboardType:
const
TextInputType
.
numberWithOptions
(
decimal:
true
),
onChanged:
(
_
)
async
{
...
...
@@ -337,7 +344,6 @@ void paymentPopup(BuildContext context, String toAddress, String username) {
),
onPressed:
canValidate
?
()
async
{
// FocusScope.of(context).unfocus();
Navigator
.
pop
(
context
);
await
executeTransfert
();
}
...
...
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