forked from GLEECBTC/gleec-wallet
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp_config.dart
More file actions
206 lines (176 loc) · 6.1 KB
/
app_config.dart
File metadata and controls
206 lines (176 loc) · 6.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
const String mmRpcVersion = '2.0';
// issue https://github.com/flutter/flutter/issues/19462#issuecomment-478284020
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
const double maxScreenWidth = 1273;
const double mainLayoutPadding = 29;
const double appBarHeight = 70;
const int scaleOnInfinitePrecision = 20; // ETH has 18 decimals, so use more
const String allWalletsStorageKey = 'all-wallets';
const String defaultDexCoin = 'FIRO';
const String trezorWalletNamePrefix = 'my trezor';
const List<Locale> localeList = [Locale('en')];
const String assetsPath = 'assets';
const String coinsAssetsPath = 'packages/komodo_defi_framework/assets';
final Uri discordSupportChannelUrl = Uri.parse(
'https://discord.com/channels/412898016371015680/429676282196787200',
);
final Uri discordInviteUrl = Uri.parse('https://komodoplatform.com/discord');
/// Const to define if Bitrefill integration is enabled in the app.
const bool isBitrefillIntegrationEnabled = false;
/// Const to define whether to show trading warning dialogs and notices.
/// This can be used to control the display of trading-related warnings
/// throughout the application.
///
///! You are solely responsible for any losses/damage that may occur due to
///! compliance issues, bugs, or other unforeseen circumstances. Komodo
///! Platform and its legal entities do not condone the use of this app for
///! trading purposes where it is not legally compliant.
const bool kShowTradingWarning = false;
const Duration kPerformanceLogInterval = Duration(minutes: 1);
/// Enable debug logging for electrum connections and RPC methods.
/// When enabled, logs detailed information about:
/// - Electrum server connections and connection counts
/// - RPC method calls with durations and responses
/// - Coin activation events and polling mechanisms
/// - Balance and price update polling
const bool kDebugElectrumLogs = true;
/// Temporary failure simulation toggles for testing UI/flows.
/// Guarded by kDebugMode in calling sites.
const bool kSimulateBestOrdersFailure = false;
const double kSimulatedBestOrdersFailureRate = 0.5; // 50%
// This information is here because it is not contextual and is branded.
// Names of their own are not localized. Also, the application is initialized before
// the localization package is initialized.
String get appTitle => 'FiroDEX Wallet | Non-Custodial Multi-Coin Wallet & DEX';
String get appShortTitle => 'FiroDEX Wallet';
Map<String, int> priorityCoinsAbbrMap = {
// FIRO always has highest priority
'FIRO': 1000,
// Top 10 cryptocurrencies by market cap (as of current data)
// Rank 1: Bitcoin (~$2.21 trillion)
'BTC': 100,
'BTC-segwit': 100,
'KMD': 100,
// Rank 2: Ethereum (~$335 billion)
'ETH': 90,
// Rank 3: Tether (~$159 billion)
'USDT': 80,
'USDT-ERC20': 80,
'USDT-PLG20': 80,
'USDT-BEP20': 80,
// Rank 4: XRP (~$145 billion)
'XRP': 70,
// Rank 5: BNB (~$93 billion)
'BNB': 60,
// Rank 6: Solana (~$84 billion)
'SOL': 50,
// Rank 7: USD Coin (~$63 billion)
'USDC': 40,
'USDC-ERC20': 40,
'USDC-PLG20': 40,
'USDC-BEP20': 40,
// Rank 8: TRON (~$27.5 billion)
'TRX': 30,
// Rank 9: Dogecoin (~$27.1 billion)
'DOGE': 20,
// Rank 10: Cardano (~$22.3 billion)
'ADA': 10,
// Additional coins with higher than default priority
'LTC-segwit': 5, // Litecoin (popular)
'LTC': 5,
// All other coins get default priority (0)
};
/// Priority ticker symbols for unauthenticated users' asset list.
/// These coins will appear first in the order specified here, before other coins.
/// Order matters: coins are displayed in the order they appear in this list.
const List<String> unauthenticatedUserPriorityTickers = [
'BTC',
'KMD',
'ETH',
'BNB',
'LTC',
'DASH',
'ZEC',
'DOGE',
];
/// List of coins that are excluded from the list of coins displayed on the
/// coin lists (e.g. wallet page, coin selection dropdowns, etc.)
/// TODO: remove this list once zhltc and NFTs are fully supported in the SDK
const Set<String> excludedAssetList = {
'ADEXBSCT',
'ADEXBSC',
'BRC',
'WID',
'EPC',
'CFUN',
'ENT',
'PLY',
'ILNSW-PLG20',
'FENIX',
'AWR',
'BOT',
'SMTF-v2',
'SFUSD',
// NFT v2 coins: https://github.com/KomodoPlatform/coins/pull/1061 will be
// used in the background, so users do not need to see them.
'NFT_ETH',
'NFT_AVAX',
'NFT_BNB',
'NFT_FTM',
'NFT_MATIC',
};
/// Some coins returned by the Banxa API are returning errors when attempting
/// to create an order. This is a temporary workaround to filter out those coins
/// until the issue is resolved.
const banxaUnsupportedCoinsList = [
'APE', // chain not configured for APE
'AVAX', // avax & bep20 - invalid wallet address error
'DOT', // bep20 - invalid wallet address error
'FIL', // bep20 - invalid wallet address error
'ONE', // invalid wallet address error (one**** (native) format expected)
'TON', // erc20 - invalid wallet address error
'TRX', // bep20 - invalid wallet address error
'XML', // invalid wallet address error
];
const rampUnsupportedCoinsList = [
'ONE', // invalid wallet address error (one**** format expected)
];
// Assets in wallet-only mode on app level,
// global wallet-only assets are defined in coins config files.
const List<String> appWalletOnlyAssetList = [
'BET',
'BOTS',
'CRYPTO',
'DEX',
'HODL',
'JUMBLR',
'MGW',
'MSHARK',
'PANGEA',
'REVS',
'SUPERNET',
];
/// Coins that are enabled by default on restore from seed or registration.
/// This will not affect existing wallets.
/// Reduced to only KMD to minimize initial connections and resource usage.
List<String> get enabledByDefaultCoins => [
'FIRO', // FIRO default coin
'KMD', // KMD default coin
'BTC-segwit', // Default Fiat Ramps coin
'USDT-PLG20',
'KMD',
'LTC-segwit',
'ETH',
'MATIC',
'BNB',
'AVAX',
'FTM'
];
const String logsDbName = 'logs';
const String appFolder = 'KomodoWallet';
Future<String> get applicationDocumentsDirectory async => kIsWeb
? appFolder
: '${(await getApplicationDocumentsDirectory()).path}/$appFolder';