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
55beb7ce
Commit
55beb7ce
authored
4 years ago
by
poka
Browse files
Options
Downloads
Plain Diff
Merge branch 'feat/getPinLenght'
parents
5ec1e720
2a106085
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/main.dart
+0
-3
0 additions, 3 deletions
lib/main.dart
lib/models/walletOptions.dart
+10
-0
10 additions, 0 deletions
lib/models/walletOptions.dart
lib/screens/myWallets/walletOptions.dart
+2
-7
2 additions, 7 deletions
lib/screens/myWallets/walletOptions.dart
with
12 additions
and
10 deletions
lib/main.dart
+
0
−
3
View file @
55beb7ce
...
...
@@ -15,7 +15,6 @@ import 'package:provider/provider.dart';
import
'package:sentry_flutter/sentry_flutter.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
import
"package:system_info/system_info.dart"
;
final
bool
enableSentry
=
true
;
...
...
@@ -30,8 +29,6 @@ Future<void> main() async {
await
_homeProvider
.
createDefaultAvatar
();
appVersion
=
await
_homeProvider
.
getAppVersion
();
prefs
=
await
SharedPreferences
.
getInstance
();
ramSys
=
SysInfo
.
getTotalPhysicalMemory
()
~/
800000
;
print
(
"Votre appareil fait
$ramSys
de RAM."
);
final
HiveStore
_store
=
await
HiveStore
.
open
(
path:
'
${appPath.path}
/gqlCache'
);
...
...
This diff is collapsed.
Click to expand it.
lib/models/walletOptions.dart
+
10
−
0
View file @
55beb7ce
...
...
@@ -75,6 +75,16 @@ class WalletOptionsProvider with ChangeNotifier {
}
}
int
getPinLenght
(
_name
)
{
File
_walletFile
=
File
(
'
${walletsDirectory.path}
/
$_name
/wallet.dewif'
);
String
_localDewif
=
_walletFile
.
readAsStringSync
();
final
int
_pinLenght
=
DubpRust
.
getDewifSecretCodeLen
(
dewif:
_localDewif
,
secretCodeType:
SecretCodeType
.
letters
);
return
_pinLenght
;
}
Future
_renameWallet
(
_walletName
,
_newName
)
async
{
final
_walletFile
=
Directory
(
'
${walletsDirectory.path}
/
$_walletName
'
);
...
...
This diff is collapsed.
Click to expand it.
lib/screens/myWallets/walletOptions.dart
+
2
−
7
View file @
55beb7ce
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
import
'package:dubp/dubp.dart'
;
import
'package:gecko/globals.dart'
;
import
'package:gecko/models/myWallets.dart'
;
import
'package:gecko/models/walletOptions.dart'
;
import
'package:gecko/screens/myWallets/changePin.dart'
;
...
...
@@ -22,7 +21,6 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
bool
hasError
=
false
;
var
pinColor
=
Color
(
0xffF9F9F1
);
var
walletPin
=
''
;
int
_pinLenght
;
Future
<
NewWallet
>
get
badWallet
=
>
null
;
...
...
@@ -35,11 +33,8 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
Provider
.
of
<
MyWalletsProvider
>(
context
);
errorController
=
StreamController
<
ErrorAnimationType
>();
// _walletOptions.isWalletUnlock = false;
if
(
ramSys
<
=
3000
)
{
_pinLenght
=
6
;
}
else
{
_pinLenght
=
5
;
}
final
int
_pinLenght
=
_walletOptions
.
getPinLenght
(
this
.
walletName
);
return
WillPopScope
(
onWillPop:
()
{
...
...
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