mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
ease in to using exchange for new users WIP
This commit is contained in:
parent
a84b7e7c28
commit
844590d10f
2 changed files with 15 additions and 1 deletions
|
@ -9,6 +9,7 @@ import 'package:stackwallet/models/node_model.dart';
|
|||
import 'package:stackwallet/models/notification_model.dart';
|
||||
import 'package:stackwallet/models/trade_wallet_lookup.dart';
|
||||
import 'package:stackwallet/services/wallets_service.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
|
||||
|
@ -142,6 +143,13 @@ class DB {
|
|||
_loadSharedCoinCacheBoxes(),
|
||||
]);
|
||||
_initialized = true;
|
||||
|
||||
if (get(boxName: boxNamePrefs, key: "familiarity") == null) {
|
||||
await put(boxName: boxNamePrefs, key: "familiarity", value: 0);
|
||||
}
|
||||
int count = get(boxName: boxNamePrefs, key: "familiarity") as int;
|
||||
await put(boxName: boxNamePrefs, key: "familiarity", value: count + 1);
|
||||
Constants.exchangeForExperiencedUsers(count + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
|
||||
class _LayoutSizing {
|
||||
const _LayoutSizing();
|
||||
|
@ -14,7 +15,12 @@ class _LayoutSizing {
|
|||
abstract class Constants {
|
||||
static const size = _LayoutSizing();
|
||||
|
||||
static final bool enableExchange = !Platform.isIOS;
|
||||
static void exchangeForExperiencedUsers(int count) {
|
||||
enableExchange =
|
||||
Util.isDesktop || Platform.isAndroid || count > 5 || !Platform.isIOS;
|
||||
}
|
||||
|
||||
static bool enableExchange = Util.isDesktop || !Platform.isIOS;
|
||||
|
||||
//TODO: correct for monero?
|
||||
static const int satsPerCoinMonero = 1000000000000;
|
||||
|
|
Loading…
Reference in a new issue