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
345a6005
Commit
345a6005
authored
2 years ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
Change derivation %3 to %2; Harden derivation
parent
d53facca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#15581
failed
2 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/providers/my_wallets.dart
+4
-3
4 additions, 3 deletions
lib/providers/my_wallets.dart
lib/providers/substrate_sdk.dart
+1
-1
1 addition, 1 deletion
lib/providers/substrate_sdk.dart
lib/screens/settings.dart
+2
-1
2 additions, 1 deletion
lib/screens/settings.dart
with
7 additions
and
5 deletions
lib/providers/my_wallets.dart
+
4
−
3
View file @
345a6005
...
...
@@ -126,10 +126,10 @@ class MyWalletsProvider with ChangeNotifier {
List
<
WalletData
>
_walletConfig
=
readAllWallets
(
_chest
);
if
(
_walletConfig
.
isEmpty
)
{
_newDerivationNbr
=
3
;
_newDerivationNbr
=
2
;
_newWalletNbr
=
0
;
}
else
{
_newDerivationNbr
=
_walletConfig
.
last
.
derivation
!
+
3
;
_newDerivationNbr
=
_walletConfig
.
last
.
derivation
!
+
2
;
_newWalletNbr
=
_walletConfig
.
last
.
number
!
+
1
;
}
...
...
@@ -141,7 +141,8 @@ class MyWalletsProvider with ChangeNotifier {
final
int
?
_currentChestNumber
=
myWalletProvider
.
getCurrentChest
();
final
ChestData
_currentChest
=
chestBox
.
get
(
_currentChestNumber
)
!
;
final
address
=
await
_sdk
.
derive
(
context
,
_currentChest
.
address
!
,
_newDerivationNbr
,
pinCode
);
final
address
=
await
_sdk
.
derive
(
context
,
_currentChest
.
address
!
,
_newDerivationNbr
,
pinCode
);
WalletData
newWallet
=
WalletData
(
chest:
_chest
,
...
...
This diff is collapsed.
Click to expand it.
lib/providers/substrate_sdk.dart
+
1
−
1
View file @
345a6005
...
...
@@ -299,7 +299,7 @@ class SubstrateSdk with ChangeNotifier {
print
(
generatedMnemonic
);
print
(
sourceDerivation
);
return
await
importAccount
(
fromMnemonic:
true
,
derivePath:
'/
$number
'
);
return
await
importAccount
(
fromMnemonic:
true
,
derivePath:
'/
/
$number
'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/screens/settings.dart
+
2
−
1
View file @
345a6005
...
...
@@ -124,7 +124,8 @@ class SettingsScreen extends StatelessWidget {
),
onPressed:
()
async
=
>
{
log
.
i
(
'Suppression de tous les wallets'
),
await
_myWallets
.
deleteAllWallet
(
context
)
await
_myWallets
.
deleteAllWallet
(
context
),
await
_sub
.
deleteAllAccounts
()
},
child:
const
Text
(
"EFFACER TOUS MES PORTEFEUILLES"
,
style:
TextStyle
(
fontSize:
20
)))))),
...
...
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