mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-25 05:58:42 +01:00
Nano-GPT (#1336)
* init * updates * nano updates * updates * updates * [skipci] wip deep link changes * fix deep links * minor fix * add reminder message on buy and exchange routes * [skip ci] font fixes * review updates * [skip ci] minor fix * save * fixes * minor code cleanup * minor potential fix
This commit is contained in:
@@ -6,6 +6,7 @@ import 'utils/utils.dart';
|
||||
const configPath = 'tool/.secrets-config.json';
|
||||
const evmChainsConfigPath = 'tool/.evm-secrets-config.json';
|
||||
const solanaConfigPath = 'tool/.solana-secrets-config.json';
|
||||
const nanoConfigPath = 'tool/.nano-secrets-config.json';
|
||||
const tronConfigPath = 'tool/.tron-secrets-config.json';
|
||||
|
||||
Future<void> main(List<String> args) async => generateSecretsConfig(args);
|
||||
@@ -21,6 +22,7 @@ Future<void> generateSecretsConfig(List<String> args) async {
|
||||
final configFile = File(configPath);
|
||||
final evmChainsConfigFile = File(evmChainsConfigPath);
|
||||
final solanaConfigFile = File(solanaConfigPath);
|
||||
final nanoConfigFile = File(nanoConfigPath);
|
||||
final tronConfigFile = File(tronConfigPath);
|
||||
|
||||
final secrets = <String, dynamic>{};
|
||||
@@ -42,45 +44,48 @@ Future<void> generateSecretsConfig(List<String> args) async {
|
||||
}
|
||||
}
|
||||
|
||||
// base:
|
||||
SecretKey.base.forEach((sec) {
|
||||
if (secrets[sec.name] != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
secrets[sec.name] = sec.generate();
|
||||
});
|
||||
|
||||
var secretsJson = JsonEncoder.withIndent(' ').convert(secrets);
|
||||
await configFile.writeAsString(secretsJson);
|
||||
|
||||
secrets.clear();
|
||||
|
||||
// evm chains:
|
||||
SecretKey.evmChainsSecrets.forEach((sec) {
|
||||
if (secrets[sec.name] != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
secrets[sec.name] = sec.generate();
|
||||
});
|
||||
|
||||
secretsJson = JsonEncoder.withIndent(' ').convert(secrets);
|
||||
|
||||
await evmChainsConfigFile.writeAsString(secretsJson);
|
||||
|
||||
secrets.clear();
|
||||
|
||||
// solana:
|
||||
SecretKey.solanaSecrets.forEach((sec) {
|
||||
if (secrets[sec.name] != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
secrets[sec.name] = sec.generate();
|
||||
});
|
||||
|
||||
secretsJson = JsonEncoder.withIndent(' ').convert(secrets);
|
||||
|
||||
await solanaConfigFile.writeAsString(secretsJson);
|
||||
secrets.clear();
|
||||
|
||||
// nano:
|
||||
SecretKey.nanoSecrets.forEach((sec) {
|
||||
if (secrets[sec.name] != null) {
|
||||
return;
|
||||
}
|
||||
secrets[sec.name] = sec.generate();
|
||||
});
|
||||
secretsJson = JsonEncoder.withIndent(' ').convert(secrets);
|
||||
await nanoConfigFile.writeAsString(secretsJson);
|
||||
secrets.clear();
|
||||
|
||||
SecretKey.tronSecrets.forEach((sec) {
|
||||
@@ -90,8 +95,7 @@ Future<void> generateSecretsConfig(List<String> args) async {
|
||||
|
||||
secrets[sec.name] = sec.generate();
|
||||
});
|
||||
|
||||
secretsJson = JsonEncoder.withIndent(' ').convert(secrets);
|
||||
|
||||
await tronConfigFile.writeAsString(secretsJson);
|
||||
secrets.clear();
|
||||
}
|
||||
|
||||
@@ -50,6 +50,10 @@ class SecretKey {
|
||||
SecretKey('ankrApiKey', () => ''),
|
||||
];
|
||||
|
||||
static final nanoSecrets = [
|
||||
SecretKey('nano2ApiKey', () => ''),
|
||||
];
|
||||
|
||||
static final tronSecrets = [
|
||||
SecretKey('tronGridApiKey', () => ''),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user