mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
fix: Tron file write, build scripts
This commit is contained in:
parent
784cd33772
commit
a726f29f5b
6 changed files with 39 additions and 10 deletions
|
@ -130,7 +130,7 @@ abstract class TronWalletBase
|
|||
required EncryptionFileUtils encryptionFileUtils,
|
||||
}) async {
|
||||
final path = await pathForWallet(name: name, type: walletInfo.type);
|
||||
final jsonSource = await read(path: path, password: password);
|
||||
final jsonSource = await encryptionFileUtils.read(path: path, password: password);
|
||||
final data = json.decode(jsonSource) as Map;
|
||||
final mnemonic = data['mnemonic'] as String?;
|
||||
final privateKey = data['private_key'] as String?;
|
||||
|
@ -420,7 +420,7 @@ abstract class TronWalletBase
|
|||
Future<void> save() async {
|
||||
await walletAddresses.updateAddressesInBox();
|
||||
final path = await makePath();
|
||||
await write(path: path, password: _password, data: toJSON());
|
||||
await encryptionFileUtils.write(path: path, password: _password, data: toJSON());
|
||||
await transactionHistory.save();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <cw_monero/cw_monero_plugin.h>
|
||||
#include <devicelocale/devicelocale_plugin.h>
|
||||
#include <flutter_local_authentication/flutter_local_authentication_plugin.h>
|
||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
|
@ -22,9 +21,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
|||
g_autoptr(FlPluginRegistrar) flutter_local_authentication_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterLocalAuthenticationPlugin");
|
||||
flutter_local_authentication_plugin_register_with_registrar(flutter_local_authentication_registrar);
|
||||
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
|
||||
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||
|
|
|
@ -6,11 +6,11 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||
cw_monero
|
||||
devicelocale
|
||||
flutter_local_authentication
|
||||
flutter_secure_storage_linux
|
||||
url_launcher_linux
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
sp_scanner
|
||||
)
|
||||
|
||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||
|
|
|
@ -11,7 +11,6 @@ import device_info_plus
|
|||
import devicelocale
|
||||
import flutter_inappwebview_macos
|
||||
import flutter_local_authentication
|
||||
import flutter_secure_storage_macos
|
||||
import in_app_review
|
||||
import package_info_plus
|
||||
import path_provider_foundation
|
||||
|
@ -27,7 +26,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||
DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin"))
|
||||
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
|
||||
FlutterLocalAuthenticationPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalAuthenticationPlugin"))
|
||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||
InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin"))
|
||||
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
|
|
35
scripts/linux/app_env.fish
Normal file
35
scripts/linux/app_env.fish
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
set -g APP_LINUX_NAME ""
|
||||
set -g APP_LINUX_VERSION ""
|
||||
set -g APP_LINUX_BUILD_NUMBER ""
|
||||
|
||||
set -g CAKEWALLET "cakewallet"
|
||||
|
||||
set -g TYPES $CAKEWALLET
|
||||
set -g APP_LINUX_TYPE $CAKEWALLET
|
||||
|
||||
if test -n "$argv[1]"
|
||||
set -g APP_LINUX_TYPE $argv[1]
|
||||
end
|
||||
|
||||
set -g CAKEWALLET_NAME "Cake Wallet"
|
||||
set -g CAKEWALLET_VERSION "1.9.0"
|
||||
set -g CAKEWALLET_BUILD_NUMBER 29
|
||||
|
||||
if not contains -- $APP_LINUX_TYPE $TYPES
|
||||
echo "Wrong app type."
|
||||
exit 1
|
||||
end
|
||||
|
||||
switch $APP_LINUX_TYPE
|
||||
case $CAKEWALLET
|
||||
set -g APP_LINUX_NAME $CAKEWALLET_NAME
|
||||
set -g APP_LINUX_VERSION $CAKEWALLET_VERSION
|
||||
set -g APP_LINUX_BUILD_NUMBER $CAKEWALLET_BUILD_NUMBER
|
||||
end
|
||||
|
||||
export APP_LINUX_TYPE
|
||||
export APP_LINUX_NAME
|
||||
export APP_LINUX_VERSION
|
||||
export APP_LINUX_BUILD_NUMBER
|
|
@ -3,7 +3,7 @@ gcc10Stdenv.mkDerivation {
|
|||
name="gcc10-stdenv";
|
||||
buildInputs = [
|
||||
pkgs.cmake
|
||||
pkgs.pkgconfig
|
||||
pkgs.pkg-config
|
||||
pkgs.autoconf
|
||||
pkgs.libtool
|
||||
pkgs.expat
|
||||
|
|
Loading…
Reference in a new issue