mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
2877cc160c
* feat: Fetch and save icons of SPL tokens when adding them * feat: Implement fetch and save icons for ERC20 tokens when adding them * fix: Add moralisApiKey to evm secrets * Add check to ensure decimals cannot be zero * - Fallback to adding erc20 token from web3dart - Wrap fetching spl token icon in a try/catch block --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
54 lines
2.2 KiB
Dart
54 lines
2.2 KiB
Dart
import 'package:encrypt/encrypt.dart' as encrypt;
|
|
import 'package:convert/convert.dart';
|
|
|
|
class SecretKey {
|
|
const SecretKey(this.name, this.generate);
|
|
|
|
static final base = [
|
|
SecretKey('salt', () => hex.encode(encrypt.Key.fromSecureRandom(16).bytes)),
|
|
SecretKey('keychainSalt', () => hex.encode(encrypt.Key.fromSecureRandom(12).bytes)),
|
|
SecretKey('key', () => hex.encode(encrypt.Key.fromSecureRandom(16).bytes)),
|
|
SecretKey('walletSalt', () => hex.encode(encrypt.Key.fromSecureRandom(4).bytes)),
|
|
SecretKey('shortKey', () => hex.encode(encrypt.Key.fromSecureRandom(12).bytes)),
|
|
SecretKey('backupSalt', () => hex.encode(encrypt.Key.fromSecureRandom(8).bytes)),
|
|
SecretKey('backupKeychainSalt', () => hex.encode(encrypt.Key.fromSecureRandom(12).bytes)),
|
|
SecretKey('changeNowApiKey', () => ''),
|
|
SecretKey('changeNowApiKeyDesktop', () => ''),
|
|
SecretKey('wyreSecretKey', () => ''),
|
|
SecretKey('wyreApiKey', () => ''),
|
|
SecretKey('wyreAccountId', () => ''),
|
|
SecretKey('moonPayApiKey', () => ''),
|
|
SecretKey('moonPaySecretKey', () => ''),
|
|
SecretKey('sideShiftAffiliateId', () => ''),
|
|
SecretKey('simpleSwapApiKey', () => ''),
|
|
SecretKey('simpleSwapApiKeyDesktop', () => ''),
|
|
SecretKey('anypayToken', () => ''),
|
|
SecretKey('onramperApiKey', () => ''),
|
|
SecretKey('ioniaClientId', () => ''),
|
|
SecretKey('trocadorApiKey', () => ''),
|
|
SecretKey('trocadorExchangeMarkup', () => ''),
|
|
SecretKey('twitterBearerToken', () => ''),
|
|
SecretKey('anonPayReferralCode', () => ''),
|
|
SecretKey('fiatApiKey', () => ''),
|
|
SecretKey('payfuraApiKey', () => ''),
|
|
SecretKey('chatwootWebsiteToken', () => ''),
|
|
SecretKey('exolixApiKey', () => ''),
|
|
SecretKey('robinhoodApplicationId', () => ''),
|
|
SecretKey('exchangeHelperApiKey', () => ''),
|
|
SecretKey('walletConnectProjectId', () => ''),
|
|
SecretKey('moralisApiKey', () => ''),
|
|
];
|
|
|
|
static final evmChainsSecrets = [
|
|
SecretKey('etherScanApiKey', () => ''),
|
|
SecretKey('polygonScanApiKey', () => ''),
|
|
SecretKey('moralisApiKey', () => ''),
|
|
];
|
|
|
|
static final solanaSecrets = [
|
|
SecretKey('ankrApiKey', () => ''),
|
|
];
|
|
|
|
final String name;
|
|
final String Function() generate;
|
|
}
|