mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
Added the project
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"salt": "",
|
||||
"key": "",
|
||||
"walletSalt": "",
|
||||
"shortKey": "",
|
||||
"change_now_api_key": ""
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
const secretsProdPath = 'tool/.secrets-prod.json';
|
||||
const secretsTestPath = 'tool/.secrets-test.json';
|
||||
const outputPath = 'lib/.secrets.g.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
final inputPath = FileSystemEntity.typeSync(secretsProdPath) !=
|
||||
FileSystemEntityType.notFound
|
||||
? secretsProdPath
|
||||
: secretsTestPath;
|
||||
|
||||
final inoutContent = File(inputPath).readAsStringSync();
|
||||
final config = json.decode(inoutContent);
|
||||
final output =
|
||||
'const salt = \'${config["salt"]}\';\nconst key = \'${config["key"]}\';\nconst walletSalt = \'${config["walletSalt"]}\';\nconst shortKey = \'${config["shortKey"]}\';\nconst change_now_api_key = \'${config["change_now_api_key"]}\';';
|
||||
|
||||
File(outputPath).writeAsString(output);
|
||||
}
|
||||
Reference in New Issue
Block a user