mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
Merge branch 'cake-tech:dev' into dev
This commit is contained in:
@@ -113,12 +113,15 @@ jobs:
|
||||
|
||||
- name: Build monero_c
|
||||
run: |
|
||||
mkdir -p scripts/monero_c
|
||||
pushd scripts/monero_c
|
||||
wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip
|
||||
unzip release-bundle.zip
|
||||
rm release-bundle.zip
|
||||
unxz -fv release/*/*.xz
|
||||
./scripts/prepare_moneroc.sh
|
||||
mkdir -p scripts/monero_c/release
|
||||
pushd scripts/monero_c/release
|
||||
mkdir -p $(git describe --tags)
|
||||
pushd $(git describe --tags)
|
||||
wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
|
||||
unzip release-bundle.zip
|
||||
rm release-bundle.zip
|
||||
popd
|
||||
popd
|
||||
|
||||
- name: Execute Build and Setup Commands
|
||||
@@ -218,7 +221,7 @@ jobs:
|
||||
exec timeout --signal=SIGKILL 900 flutter drive --driver=test_driver/integration_test.dart --target=integration_test/test_suites/restore_wallet_through_seeds_flow_test.dart
|
||||
- name: Test [cw_monero]
|
||||
timeout-minutes: 15
|
||||
run: cd cw_monero && flutter test --verbose
|
||||
run: cd cw_monero && flutter test
|
||||
- name: Stop screen recording, encrypt and upload
|
||||
if: always()
|
||||
run: |
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
lib*_wallet2_api_c.so
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../scripts/monero_c/release/monero/aarch64-linux-android_libwallet2_api_c.so
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../scripts/monero_c/release/wownero/aarch64-linux-android_libwallet2_api_c.so
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../scripts/monero_c/release/zano/aarch64-linux-android_libwallet2_api_c.so
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../scripts/monero_c/release/monero/armv7a-linux-androideabi_libwallet2_api_c.so
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../scripts/monero_c/release/wownero/armv7a-linux-androideabi_libwallet2_api_c.so
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../scripts/monero_c/release/zano/armv7a-linux-androideabi_libwallet2_api_c.so
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../scripts/monero_c/release/monero/x86_64-linux-android_libwallet2_api_c.so
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../scripts/monero_c/release/wownero/x86_64-linux-android_libwallet2_api_c.so
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../scripts/monero_c/release/zano/x86_64-linux-android_libwallet2_api_c.so
|
||||
@@ -582,8 +582,8 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "impls/monero.dart"
|
||||
ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
|
||||
resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
|
||||
ref: c157cb82973b05d1226b39b4d8de0bec4aa10000
|
||||
resolved-ref: c157cb82973b05d1226b39b4d8de0bec4aa10000
|
||||
url: "https://github.com/mrcyjanek/monero_c"
|
||||
source: git
|
||||
version: "0.0.0"
|
||||
|
||||
@@ -26,7 +26,7 @@ dependencies:
|
||||
monero:
|
||||
git:
|
||||
url: https://github.com/mrcyjanek/monero_c
|
||||
ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29
|
||||
ref: c157cb82973b05d1226b39b4d8de0bec4aa10000
|
||||
path: impls/monero.dart
|
||||
mutex: ^3.1.0
|
||||
ledger_flutter_plus: ^1.4.1
|
||||
@@ -54,7 +54,6 @@ flutter:
|
||||
# be modified. They are used by the tooling to maintain consistency when
|
||||
# adding or updating assets for this project.
|
||||
|
||||
|
||||
# To add assets to your plugin package, add an assets section, like this:
|
||||
# assets:
|
||||
# - images/a_dot_burr.jpeg
|
||||
|
||||
@@ -18,7 +18,7 @@ import 'utils/setup_monero_c.dart';
|
||||
Future<void> main() async {
|
||||
group("MoneroWalletService Tests", () {
|
||||
late MoneroWalletService walletService;
|
||||
late File moneroCBinary;
|
||||
File? moneroCBinary;
|
||||
|
||||
setUpAll(() async {
|
||||
await initDb(pathOverride: './test/data/db');
|
||||
@@ -34,7 +34,7 @@ Future<void> main() async {
|
||||
|
||||
tearDownAll(() {
|
||||
Directory('./test/data').deleteSync(recursive: true);
|
||||
moneroCBinary.deleteSync();
|
||||
moneroCBinary!.deleteSync();
|
||||
});
|
||||
|
||||
group("Create wallet", () {
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
import 'dart:io';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
File getMoneroCBinary() {
|
||||
if (Platform.isWindows)
|
||||
return File(
|
||||
'../scripts/monero_c/release/monero/x86_64-w64-mingw32_libwallet2_api_c.dll');
|
||||
if (Platform.isMacOS) return File('../macos/monero_libwallet2_api_c.dylib');
|
||||
return File('../scripts/monero_c/release/monero/x86_64-linux-gnu_libwallet2_api_c.so');
|
||||
final baseDir = Directory('../scripts/monero_c/release');
|
||||
|
||||
final versionDir =
|
||||
baseDir.listSync().whereType<Directory>().map((d) => d.path).firstWhere(
|
||||
(path) => p.basename(path).startsWith('v'),
|
||||
);
|
||||
|
||||
if (Platform.isWindows) {
|
||||
return File(p.join(
|
||||
versionDir, 'x86_64-w64-mingw32', 'libmonero_wallet2_api_c.dll'));
|
||||
}
|
||||
if (Platform.isMacOS) {
|
||||
return File(p.join(versionDir, 'macos', 'libmonero_wallet2_api_c.dylib'));
|
||||
}
|
||||
return File(
|
||||
p.join(versionDir, 'x86_64-linux-gnu', 'libmonero_wallet2_api_c.so'));
|
||||
}
|
||||
|
||||
String get moneroCBinaryName {
|
||||
if (Platform.isWindows)
|
||||
return "monero_libwallet2_api_c.dll";
|
||||
if (Platform.isMacOS) return "monero_libwallet2_api_c.dylib";
|
||||
return "/usr/lib/monero_libwallet2_api_c.so";
|
||||
if (Platform.isWindows) return "libmonero_wallet2_api_c.dll";
|
||||
if (Platform.isMacOS) return "libmonero_wallet2_api_c.dylib";
|
||||
return "/usr/lib/libmonero_wallet2_api_c.so";
|
||||
}
|
||||
|
||||
@@ -502,8 +502,8 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "impls/monero.dart"
|
||||
ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
|
||||
resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
|
||||
ref: "c157cb82973b05d1226b39b4d8de0bec4aa10000"
|
||||
resolved-ref: "c157cb82973b05d1226b39b4d8de0bec4aa10000"
|
||||
url: "https://github.com/mrcyjanek/monero_c"
|
||||
source: git
|
||||
version: "0.0.0"
|
||||
|
||||
@@ -24,7 +24,7 @@ dependencies:
|
||||
monero:
|
||||
git:
|
||||
url: https://github.com/mrcyjanek/monero_c
|
||||
ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 # monero_c hash
|
||||
ref: c157cb82973b05d1226b39b4d8de0bec4aa10000 # monero_c hash
|
||||
path: impls/monero.dart
|
||||
mutex: ^3.1.0
|
||||
|
||||
@@ -49,7 +49,6 @@ flutter:
|
||||
# be modified. They are used by the tooling to maintain consistency when
|
||||
# adding or updating assets for this project.
|
||||
|
||||
|
||||
# To add assets to your plugin package, add an assets section, like this:
|
||||
# assets:
|
||||
# - images/a_dot_burr.jpeg
|
||||
|
||||
@@ -507,8 +507,8 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "impls/monero.dart"
|
||||
ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
|
||||
resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
|
||||
ref: "c157cb82973b05d1226b39b4d8de0bec4aa10000"
|
||||
resolved-ref: "c157cb82973b05d1226b39b4d8de0bec4aa10000"
|
||||
url: "https://github.com/mrcyjanek/monero_c"
|
||||
source: git
|
||||
version: "0.0.0"
|
||||
|
||||
@@ -25,7 +25,7 @@ dependencies:
|
||||
monero:
|
||||
git:
|
||||
url: https://github.com/mrcyjanek/monero_c
|
||||
ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 # monero_c hash
|
||||
ref: c157cb82973b05d1226b39b4d8de0bec4aa10000 # monero_c hash
|
||||
path: impls/monero.dart
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
@@ -38,7 +38,6 @@ dev_dependencies:
|
||||
dependency_overrides:
|
||||
watcher: ^1.1.0
|
||||
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class AssetsTopBar extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: Row(
|
||||
spacing: 0,
|
||||
spacing: 6,
|
||||
children: [
|
||||
CakeImageWidget(
|
||||
imageUrl: "assets/new-ui/options_slider.svg",
|
||||
|
||||
@@ -144,13 +144,13 @@ class _SignPageState extends State<SignPage> {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
showPopUp<void>(
|
||||
context: context,
|
||||
builder: (_) {
|
||||
builder: (_context) {
|
||||
return AlertWithOneAction(
|
||||
alertTitle: S.current.error,
|
||||
alertContent: state.error,
|
||||
buttonText: S.of(context).ok,
|
||||
buttonAction: () {
|
||||
if (context.mounted && Navigator.canPop(context)) Navigator.of(context).pop();
|
||||
if (context.mounted && Navigator.canPop(_context)) Navigator.of(_context).pop();
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -32,7 +32,6 @@ class OtherSettingsPage extends BasePage {
|
||||
|
||||
final OtherSettingsViewModel _otherSettingsViewModel;
|
||||
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
return ModalPageWrapper(
|
||||
@@ -45,8 +44,7 @@ class OtherSettingsPage extends BasePage {
|
||||
// iconPath: "assets/new-ui/settings_row_icons/other.svg",
|
||||
// message: "Other settings",
|
||||
// title: S.of(context).other_settings),
|
||||
content: NewListSections(
|
||||
sections: {
|
||||
content: NewListSections(sections: {
|
||||
"": [
|
||||
if (_otherSettingsViewModel.displayTransactionPriority)
|
||||
_otherSettingsViewModel.walletType == WalletType.bitcoin
|
||||
@@ -54,70 +52,76 @@ class OtherSettingsPage extends BasePage {
|
||||
keyValue: "fee_priority",
|
||||
label: S.of(context).settings_fee_priority,
|
||||
options: [_otherSettingsViewModel.transactionPriority.title],
|
||||
onTap: () async {
|
||||
onTap: () async {
|
||||
final items = priorityForWalletType(_otherSettingsViewModel.walletType);
|
||||
|
||||
final items = priorityForWalletType(_otherSettingsViewModel.walletType);
|
||||
var selectedAtIndex =
|
||||
items.indexOf(_otherSettingsViewModel.transactionPriority);
|
||||
double sliderValue = _otherSettingsViewModel.customBitcoinFeeRate;
|
||||
|
||||
var selectedAtIndex = items.indexOf(_otherSettingsViewModel.transactionPriority);
|
||||
double sliderValue = _otherSettingsViewModel.customBitcoinFeeRate ?? 0.0;
|
||||
|
||||
await showPopUp<void>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return StatefulBuilder(
|
||||
builder: (BuildContext context, StateSetter setState) {
|
||||
return Picker(
|
||||
items: items,
|
||||
displayItem: (TransactionPriority item) => _otherSettingsViewModel.getDisplayBitcoinPriority(item, sliderValue.round()),
|
||||
selectedAtIndex: selectedAtIndex,
|
||||
customItemIndex: _otherSettingsViewModel.customPriorityItemIndex,
|
||||
maxValue: _otherSettingsViewModel.maxCustomFeeRate?.toDouble(),
|
||||
headerEnabled: false,
|
||||
closeOnItemSelected: false,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
sliderValue: sliderValue,
|
||||
onSliderChanged: (double newValue) =>
|
||||
setState(() => sliderValue = newValue),
|
||||
onItemSelected: (TransactionPriority priority) {
|
||||
setState(() => selectedAtIndex = items.indexOf(priority));
|
||||
_otherSettingsViewModel.onDisplayBitcoinPrioritySelected.call(priority, sliderValue);
|
||||
await showPopUp<void>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return StatefulBuilder(
|
||||
builder: (BuildContext context, StateSetter setState) {
|
||||
return Picker(
|
||||
items: items,
|
||||
displayItem: (TransactionPriority item) => _otherSettingsViewModel
|
||||
.getDisplayBitcoinPriority(item, sliderValue.round()),
|
||||
selectedAtIndex: selectedAtIndex,
|
||||
customItemIndex: _otherSettingsViewModel.customPriorityItemIndex,
|
||||
maxValue: _otherSettingsViewModel.maxCustomFeeRate?.toDouble(),
|
||||
headerEnabled: false,
|
||||
closeOnItemSelected: false,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
sliderValue: sliderValue,
|
||||
onSliderChanged: (double newValue) =>
|
||||
setState(() => sliderValue = newValue),
|
||||
onItemSelected: (TransactionPriority priority) {
|
||||
setState(() => selectedAtIndex = items.indexOf(priority));
|
||||
_otherSettingsViewModel.onDisplayBitcoinPrioritySelected
|
||||
.call(priority, sliderValue);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
_otherSettingsViewModel.onDisplayBitcoinPrioritySelected.call(items[selectedAtIndex], sliderValue);
|
||||
}
|
||||
)
|
||||
_otherSettingsViewModel.onDisplayBitcoinPrioritySelected
|
||||
.call(items[selectedAtIndex], sliderValue);
|
||||
})
|
||||
: ListItemSelector(
|
||||
keyValue: "fee_priority",
|
||||
label: S.of(context).settings_fee_priority,
|
||||
options: [_otherSettingsViewModel.transactionPriority.title],
|
||||
onTap: () async {
|
||||
final selectedAtIndex = priorityForWalletType(_otherSettingsViewModel.walletType).indexOf(_otherSettingsViewModel.transactionPriority,);
|
||||
onTap: () async {
|
||||
final selectedAtIndex =
|
||||
priorityForWalletType(_otherSettingsViewModel.walletType).indexOf(
|
||||
_otherSettingsViewModel.transactionPriority,
|
||||
);
|
||||
|
||||
await showPopUp<void>(
|
||||
context: context,
|
||||
builder: (_) => Picker(
|
||||
items: priorityForWalletType(_otherSettingsViewModel.walletType),
|
||||
displayItem: _otherSettingsViewModel.getDisplayPriority,
|
||||
selectedAtIndex: selectedAtIndex,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
onItemSelected: (TransactionPriority item) => _otherSettingsViewModel.onDisplayBitcoinPrioritySelected.call(item, 0),
|
||||
isSeparated: false,
|
||||
await showPopUp<void>(
|
||||
context: context,
|
||||
builder: (_) => Picker(
|
||||
items: priorityForWalletType(_otherSettingsViewModel.walletType),
|
||||
displayItem: _otherSettingsViewModel.getDisplayPriority,
|
||||
selectedAtIndex: selectedAtIndex,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
onItemSelected: (TransactionPriority item) => _otherSettingsViewModel
|
||||
.onDisplayBitcoinPrioritySelected
|
||||
.call(item, 0),
|
||||
isSeparated: false,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
if(_otherSettingsViewModel.changeRepresentativeEnabled)
|
||||
ListItemRegularRow(
|
||||
keyValue: "change_rep",
|
||||
label: S.of(context).change_rep,
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.changeRep)
|
||||
),
|
||||
if (_otherSettingsViewModel.changeRepresentativeEnabled)
|
||||
ListItemRegularRow(
|
||||
keyValue: "change_rep",
|
||||
label: S.of(context).change_rep,
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.changeRep)),
|
||||
if (_otherSettingsViewModel.changeHardwareWalletTypeEnabled)
|
||||
ListItemRegularRow(
|
||||
ListItemRegularRow(
|
||||
keyValue: "hardware_wallet_manufacturer",
|
||||
label: "Hardware wallet manufacturer",
|
||||
onTap: () => Navigator.of(context)
|
||||
@@ -133,7 +137,7 @@ class OtherSettingsPage extends BasePage {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
}),
|
||||
),
|
||||
),
|
||||
ListItemRegularRow(
|
||||
keyValue: "security_backup_page_sign_and_verify",
|
||||
label: S.of(context).sign_verify_title,
|
||||
@@ -141,93 +145,79 @@ class OtherSettingsPage extends BasePage {
|
||||
Navigator.of(context).pushNamed(Routes.signPage);
|
||||
}),
|
||||
],
|
||||
if(FeatureFlag.hasDevOptions)
|
||||
"dev": [
|
||||
if(_otherSettingsViewModel.walletType == WalletType.bitcoin) ...[
|
||||
ListItemRegularRow(
|
||||
keyValue: "export_lightning_logs",
|
||||
label: S.of(context).export_lightning_logs,
|
||||
onTap: () => onExportLNLog(context)
|
||||
),
|
||||
ListItemRegularRow(
|
||||
keyValue: "export_payjoin_logs",
|
||||
label: S.of(context).export_payjoin_logs,
|
||||
onTap: () => onExportPJLog(context)
|
||||
),
|
||||
],
|
||||
if (FeatureFlag.hasDevOptions &&
|
||||
_otherSettingsViewModel.walletType == WalletType.monero)
|
||||
"dev": [
|
||||
if (_otherSettingsViewModel.walletType == WalletType.bitcoin) ...[
|
||||
ListItemRegularRow(
|
||||
keyValue: "[dev] monero background sync",
|
||||
label: "[dev] monero background sync",
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devMoneroBackgroundSync)
|
||||
),
|
||||
if (FeatureFlag.hasDevOptions &&
|
||||
[WalletType.monero, WalletType.wownero, WalletType.zano]
|
||||
.contains(_otherSettingsViewModel.walletType))
|
||||
ListItemRegularRow(
|
||||
keyValue: "[dev] xmr call profiler",
|
||||
label: "[dev] xmr call profiler",
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devMoneroCallProfiler)
|
||||
),
|
||||
if (FeatureFlag.hasDevOptions &&
|
||||
[WalletType.monero].contains(_otherSettingsViewModel.walletType))
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] xmr wallet cache debug',
|
||||
label: '[dev] xmr wallet cache debug',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devMoneroWalletCacheDebug)
|
||||
),
|
||||
keyValue: "export_lightning_logs",
|
||||
label: S.of(context).export_lightning_logs,
|
||||
onTap: () => onExportLNLog(context)),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] shared preferences',
|
||||
label: '[dev] shared preferences',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devSharedPreferences)
|
||||
),
|
||||
keyValue: "export_payjoin_logs",
|
||||
label: S.of(context).export_payjoin_logs,
|
||||
onTap: () => onExportPJLog(context)),
|
||||
],
|
||||
if (FeatureFlag.hasDevOptions && _otherSettingsViewModel.walletType == WalletType.monero)
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] secure storage preferences',
|
||||
label: '[dev] secure storage preferences',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devSecurePreferences)
|
||||
),
|
||||
keyValue: "[dev] monero background sync",
|
||||
label: "[dev] monero background sync",
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devMoneroBackgroundSync)),
|
||||
if (FeatureFlag.hasDevOptions &&
|
||||
[WalletType.monero, WalletType.wownero, WalletType.zano]
|
||||
.contains(_otherSettingsViewModel.walletType))
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] background sync logs',
|
||||
label: '[dev] background sync logs',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devBackgroundSyncLogs)
|
||||
),
|
||||
keyValue: "[dev] xmr call profiler",
|
||||
label: "[dev] xmr call profiler",
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devMoneroCallProfiler)),
|
||||
if (FeatureFlag.hasDevOptions &&
|
||||
[WalletType.monero].contains(_otherSettingsViewModel.walletType))
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] socket health logs',
|
||||
label: '[dev] socket health logs',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devSocketHealthLogs)
|
||||
),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] network requests logs',
|
||||
label: '[dev] network requests logs',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devNetworkRequests)
|
||||
),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] exchange provider logs',
|
||||
label: '[dev] exchange provider logs',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devExchangeProviderLogs)
|
||||
),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] *QR tools',
|
||||
label: '[dev] *QR tools',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devExchangeProviderLogs)
|
||||
),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] browse sqlite db',
|
||||
label: '[dev] browse sqlite db',
|
||||
onTap: () async {
|
||||
final data = await dumpDb();
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (context) =>
|
||||
JsonExplorerPage(data: data, title: 'sqlite db')),
|
||||
);
|
||||
}
|
||||
),
|
||||
]
|
||||
}
|
||||
),
|
||||
keyValue: '[dev] xmr wallet cache debug',
|
||||
label: '[dev] xmr wallet cache debug',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devMoneroWalletCacheDebug)),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] shared preferences',
|
||||
label: '[dev] shared preferences',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devSharedPreferences)),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] secure storage preferences',
|
||||
label: '[dev] secure storage preferences',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devSecurePreferences)),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] background sync logs',
|
||||
label: '[dev] background sync logs',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devBackgroundSyncLogs)),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] socket health logs',
|
||||
label: '[dev] socket health logs',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devSocketHealthLogs)),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] network requests logs',
|
||||
label: '[dev] network requests logs',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devNetworkRequests)),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] exchange provider logs',
|
||||
label: '[dev] exchange provider logs',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devExchangeProviderLogs)),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] *QR tools',
|
||||
label: '[dev] *QR tools',
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devExchangeProviderLogs)),
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] browse sqlite db',
|
||||
label: '[dev] browse sqlite db',
|
||||
onTap: () async {
|
||||
final data = await dumpDb();
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => JsonExplorerPage(data: data, title: 'sqlite db'),
|
||||
),
|
||||
);
|
||||
}),
|
||||
]
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> onExportLNLog(BuildContext context) async {
|
||||
final file = await _otherSettingsViewModel.getLightningLog();
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ abstract class WalletCreationVMBase with Store {
|
||||
credentials.walletInfo!.hashedWalletIdentifier = createHashedWalletIdentifier(wallet);
|
||||
credentials.walletInfo!.address = wallet.walletAddresses.address;
|
||||
await credentials.walletInfo!.save();
|
||||
await wallet.save();
|
||||
await _appStore.changeCurrentWallet(wallet);
|
||||
_appStore.authenticationStore.allowedCreate();
|
||||
state = ExecutedSuccessfullyState();
|
||||
|
||||
+29
-6
@@ -113,14 +113,37 @@ else()
|
||||
set(LIB_TRIPLET "x86_64-linux-gnu")
|
||||
endif()
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/zcash_lib/target/release/libwarp_api_ffi.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "libwarp_api_ffi.so"
|
||||
COMPONENT Runtime)
|
||||
execute_process(
|
||||
COMMAND git describe --tags
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c
|
||||
OUTPUT_VARIABLE MONERO_C_TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/${LIB_TRIPLET}_libwallet2_api_c.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "monero_libwallet2_api_c.so"
|
||||
COMPONENT Runtime)
|
||||
set(MONERO_C_RELEASE_DIR
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/${MONERO_C_TAG}/${LIB_TRIPLET}"
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/wownero/${LIB_TRIPLET}_libwallet2_api_c.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "wownero_libwallet2_api_c.so"
|
||||
COMPONENT Runtime)
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/zcash_lib/target/release/libwarp_api_ffi.so"
|
||||
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
RENAME "libwarp_api_ffi.so"
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${MONERO_C_RELEASE_DIR}/libmonero_wallet2_api_c.so"
|
||||
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
RENAME "libmonero_wallet2_api_c.so"
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${MONERO_C_RELEASE_DIR}/libwownero_wallet2_api_c.so"
|
||||
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
RENAME "libwownero_wallet2_api_c.so"
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
+323
-142
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
|
||||
|
||||
# Usage: env USE_DOCKER= ./build_all.sh
|
||||
# Usage: env USE_DOCKER= ./build_all.sh
|
||||
|
||||
set -x -e
|
||||
|
||||
@@ -12,15 +12,33 @@ cd "$(dirname "$0")"
|
||||
for COIN in monero wownero zano;
|
||||
do
|
||||
pushd ../monero_c
|
||||
monero_c_tag=$(git describe --tags)
|
||||
for target in {x86_64,aarch64}-linux-android armv7a-linux-androideabi
|
||||
do
|
||||
if [[ -f "release/${COIN}/${target}_libwallet2_api_c.so" ]];
|
||||
if [[ -f "release/${monero_c_tag}/${target}/${COIN}_libwallet2_api_c.so" ]];
|
||||
then
|
||||
echo "file exist, not building monero_c for ${COIN}/$target.";
|
||||
else
|
||||
./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
|
||||
unxz -f ../monero_c/release/${COIN}/${target}_libwallet2_api_c.so.xz
|
||||
fi
|
||||
|
||||
case $target in
|
||||
x86_64-linux-android)
|
||||
mkdir -p ../../android/app/src/main/jniLibs/x86_64 || true
|
||||
cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/x86_64/
|
||||
;;
|
||||
armv7a-linux-androideabi)
|
||||
mkdir -p ../../android/app/src/main/jniLibs/armeabi-v7a || true
|
||||
cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/armeabi-v7a/
|
||||
;;
|
||||
aarch64-linux-android)
|
||||
mkdir -p ../../android/app/src/main/jniLibs/arm64-v8a || true
|
||||
cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/arm64-v8a/
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported target: $target"
|
||||
exit 1;
|
||||
esac
|
||||
done
|
||||
popd
|
||||
done
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
|
||||
source "$(cd "$(dirname "$0")/.." && pwd)/functions.sh"
|
||||
|
||||
. ./config.sh
|
||||
# ./install_missing_headers.sh
|
||||
@@ -19,16 +19,8 @@ for COIN in monero wownero zano;
|
||||
do
|
||||
pushd ../monero_c
|
||||
./build_single.sh ${COIN} aarch64-apple-ios -j$MAKE_JOB_COUNT
|
||||
./build_single.sh ${COIN} aarch64-apple-iossimulator -j$MAKE_JOB_COUNT
|
||||
./build_single.sh ${COIN} aarch64-apple-ios-simulator -j$MAKE_JOB_COUNT
|
||||
popd
|
||||
done
|
||||
|
||||
unxz -fk ../monero_c/release/monero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
|
||||
unxz -fk ../monero_c/release/wownero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
|
||||
unxz -fk ../monero_c/release/zano/aarch64-apple-ios_libwallet2_api_c.dylib.xz
|
||||
|
||||
unxz -fk ../monero_c/release/monero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
|
||||
unxz -fk ../monero_c/release/wownero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
|
||||
unxz -fk ../monero_c/release/zano/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
|
||||
|
||||
./gen_framework.sh
|
||||
./gen_framework.sh
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
set -e
|
||||
|
||||
IOS_DIR="$(pwd)/../../ios"
|
||||
DYLIB_PATH="$(pwd)/../../scripts/monero_c/release"
|
||||
monero_c_tag=$(cd $(pwd)/../../scripts/monero_c/; git describe --tags)
|
||||
DYLIB_PATH="$(pwd)/../../scripts/monero_c/release/${monero_c_tag}/"
|
||||
TMP_DIR="${IOS_DIR}/tmp"
|
||||
|
||||
rm -rf "${IOS_DIR:?}/MoneroWallet.xcframework" "${IOS_DIR:?}/WowneroWallet.xcframework" "${IOS_DIR:?}/ZanoWallet.xcframework"
|
||||
@@ -16,7 +17,7 @@ write_info_plist() {
|
||||
target="$3"
|
||||
plist_path="${framework_bundle}/Info.plist"
|
||||
|
||||
if [[ "x$target" = "xiossimulator" ]]; then
|
||||
if [[ "x$target" = "xios-simulator" ]]; then
|
||||
platform="iPhoneSimulator"
|
||||
dtplatformname="iphonesimulator"
|
||||
dtsdkname="iphonesimulator17.4"
|
||||
@@ -97,11 +98,11 @@ create_framework() {
|
||||
echo "Creating ${framework_name}.framework for target ${target} in ${out_dir}..."
|
||||
|
||||
framework_bundle="${out_dir}/${framework_name}.framework"
|
||||
|
||||
|
||||
rm -rf "$framework_bundle"
|
||||
mkdir -p "$framework_bundle"
|
||||
|
||||
input_dylib="${DYLIB_PATH}/${wallet}/aarch64-apple-${target}_libwallet2_api_c.dylib"
|
||||
input_dylib="${DYLIB_PATH}/aarch64-apple-${target}/lib${wallet}_wallet2_api_c.dylib"
|
||||
if [[ ! -f "$input_dylib" ]]; then
|
||||
echo "Error: Input dylib not found: $input_dylib"
|
||||
exit 1
|
||||
@@ -144,7 +145,7 @@ for i in "${!wallets[@]}"; do
|
||||
mkdir -p "$device_out" "$simulator_out"
|
||||
|
||||
create_framework "$wallet" "$framework_name" "ios" "$device_out"
|
||||
create_framework "$wallet" "$framework_name" "iossimulator" "$simulator_out"
|
||||
create_framework "$wallet" "$framework_name" "ios-simulator" "$simulator_out"
|
||||
|
||||
device_framework="${device_out}/${framework_name}.framework"
|
||||
simulator_framework="${simulator_out}/${framework_name}.framework"
|
||||
|
||||
@@ -16,13 +16,7 @@ do
|
||||
else
|
||||
target="x86_64-linux-gnu"
|
||||
fi
|
||||
|
||||
if [[ -f "release/${COIN}/${target}_libwallet2_api_c.so" ]];
|
||||
then
|
||||
echo "file exist, not building monero_c for ${COIN}/$target.";
|
||||
else
|
||||
./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
|
||||
unxz -f ../monero_c/release/${COIN}/${target}_libwallet2_api_c.so.xz
|
||||
fi
|
||||
|
||||
./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
|
||||
popd
|
||||
done
|
||||
done
|
||||
|
||||
@@ -6,8 +6,8 @@ cd "$(dirname "$0")"
|
||||
NPROC="-j$(sysctl -n hw.logicalcpu)"
|
||||
MONERO_LIBS=""
|
||||
WOWNERO_LIBS=""
|
||||
MONEROC_RELEASE_DIR="../monero_c/release/monero"
|
||||
WOWNEROC_RELEASE_DIR="../monero_c/release/wownero"
|
||||
monero_c_tag=$(cd ../monero_c/; git describe --tags)
|
||||
MONEROC_RELEASE_DIR="../monero_c/release/${monero_c_tag}"
|
||||
|
||||
../prepare_moneroc.sh
|
||||
|
||||
@@ -35,8 +35,8 @@ else
|
||||
HOST="x86_64-apple-darwin"
|
||||
fi
|
||||
|
||||
MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
|
||||
WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
|
||||
MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}/libmonero_libwallet2_api_c.dylib"
|
||||
WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}/libwownero_libwallet2_api_c.dylib"
|
||||
|
||||
pushd ../monero_c
|
||||
./build_single.sh ${COIN} ${HOST} -j$MAKE_JOB_COUNT
|
||||
|
||||
@@ -9,18 +9,17 @@ then
|
||||
rm -rf monero_c
|
||||
git clone https://github.com/mrcyjanek/monero_c --branch master monero_c
|
||||
cd monero_c
|
||||
# NOTE: Make sure to update monero_c prebuilds link in workflow files
|
||||
# https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip
|
||||
git checkout 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29
|
||||
git reset --hard
|
||||
git submodule update --init --force --recursive
|
||||
./apply_patches.sh monero
|
||||
./apply_patches.sh wownero
|
||||
./apply_patches.sh zano
|
||||
else
|
||||
cd monero_c
|
||||
fi
|
||||
|
||||
# NOTE: Make sure to update monero_c prebuilds link in workflow files
|
||||
# https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
|
||||
git fetch -a
|
||||
git checkout c157cb82973b05d1226b39b4d8de0bec4aa10000
|
||||
git reset --hard
|
||||
git submodule update --init --force --recursive
|
||||
|
||||
for coin in monero wownero zano;
|
||||
do
|
||||
if [[ ! -f "$coin/.patch-applied" ]];
|
||||
|
||||
@@ -20,13 +20,11 @@ final List<String> triplets = [
|
||||
"x86_64-w64-mingw32",
|
||||
// "x86_64-apple-darwin11", // Intel macbooks (contrib) - not used by cake
|
||||
// "aarch64-apple-darwin11", // apple silicon macbooks (contrib) - not used by cake
|
||||
// "host-apple-darwin", // not available on CI (yet)
|
||||
// "x86_64-host-apple-darwin", // not available on CI (yet)
|
||||
"aarch64-apple-darwin", // apple silicon macbooks
|
||||
"x86_64-apple-darwin", // intel macbooks
|
||||
"aarch64-host-apple-darwin", // apple silicon macbooks (local builds)
|
||||
"aarch64-apple-ios",
|
||||
"aarch64-apple-iossimulator",
|
||||
"aarch64-apple-ios-simulator",
|
||||
];
|
||||
|
||||
Future<void> main() async {
|
||||
|
||||
Reference in New Issue
Block a user