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
cab22eb4
Commit
cab22eb4
authored
1 year ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
fix: isolate safe_home listener in consumer
parent
5ccacea4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#34422
waiting for manual action
Stage: format
Stage: build_and_test
Stage: package
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/providers/my_wallets.dart
+6
-5
6 additions, 5 deletions
lib/providers/my_wallets.dart
lib/screens/myWallets/wallets_home.dart
+2
-1
2 additions, 1 deletion
lib/screens/myWallets/wallets_home.dart
with
8 additions
and
6 deletions
lib/providers/my_wallets.dart
+
6
−
5
View file @
cab22eb4
...
...
@@ -207,6 +207,7 @@ class MyWalletsProvider with ChangeNotifier {
isOwned:
true
);
await
walletBox
.
put
(
newWallet
.
address
,
newWallet
);
await
readAllWallets
();
isNewDerivationLoading
=
false
;
notifyListeners
();
...
...
@@ -260,15 +261,15 @@ class MyWalletsProvider with ChangeNotifier {
chestNumber
??=
getCurrentChest
();
List
<
WalletData
>
walletConfig
=
await
readAllWallets
(
chestNumber
);
walletConfig
.
sort
((
p1
,
p2
)
{
//
List<WalletData> walletConfig = await readAllWallets(chestNumber);
listWallets
.
sort
((
p1
,
p2
)
{
return
Comparable
.
compare
(
p1
.
number
!
,
p2
.
number
!
);
});
if
(
walletConfig
.
isEmpty
)
{
if
(
listWallets
.
isEmpty
)
{
newDerivationNbr
=
2
;
}
else
{
WalletData
lastWallet
=
walletConfig
.
reduce
(
WalletData
lastWallet
=
listWallets
.
reduce
(
(
curr
,
next
)
=
>
curr
.
derivation
!
>
next
.
derivation
!
?
curr
:
next
);
if
(
lastWallet
.
derivation
==
-
1
)
{
...
...
@@ -277,7 +278,7 @@ class MyWalletsProvider with ChangeNotifier {
newDerivationNbr
=
lastWallet
.
derivation
!
+
(
isOneshoot
?
1
:
2
);
}
newWalletNbr
=
walletConfig
.
last
.
number
!
+
1
;
newWalletNbr
=
listWallets
.
last
.
number
!
+
1
;
}
return
[
newWalletNbr
,
newDerivationNbr
];
...
...
This diff is collapsed.
Click to expand it.
lib/screens/myWallets/wallets_home.dart
+
2
−
1
View file @
cab22eb4
...
...
@@ -37,7 +37,8 @@ class _WalletsHomeState extends State<WalletsHome> {
@override
Widget
build
(
BuildContext
context
)
{
final
myWalletProvider
=
Provider
.
of
<
MyWalletsProvider
>(
context
);
final
myWalletProvider
=
Provider
.
of
<
MyWalletsProvider
>(
context
,
listen:
false
);
final
currentChestNumber
=
myWalletProvider
.
getCurrentChest
();
final
ChestData
currentChest
=
chestBox
.
get
(
currentChestNumber
)
!
;
...
...
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