monero.dart clean

This commit is contained in:
Czarek Nakamoto 2024-04-24 21:37:22 +02:00 committed by sneurlax
parent cfe06f5b13
commit c78fba7b36
15 changed files with 40 additions and 25 deletions

3
.fvmrc Normal file
View file

@ -0,0 +1,3 @@
{
"flutter": "3.16.0"
}

3
.gitignore vendored
View file

@ -59,3 +59,6 @@ libtor_ffi.dll
flutter_libsparkmobile.dll
secp256k1.dll
/libisar.so
# FVM Version Cache
.fvm/

View file

@ -1,3 +1,4 @@
{
"dart.lineLength": 80,
"dart.flutterSdkPath": ".fvm/versions/3.16.0"
}

View file

@ -45,7 +45,12 @@ android {
lintOptions {
disable 'InvalidPackage'
}
packagingOptions {
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.cypherstack.stackwallet"

View file

@ -23,7 +23,8 @@
android:requestLegacyExternalStorage="true"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:fullBackupContent="false">
android:fullBackupContent="false"
android:extractNativeLibs="true">
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"

View file

@ -0,0 +1 @@
../../../../../../crypto_plugins/flutter_libmonero/scripts/monero_c/release/monero/aarch64-linux-android_libwallet2_api_c.so

View file

@ -0,0 +1 @@
../../../../../../crypto_plugins/flutter_libmonero/scripts/monero_c/release/monero/arm-linux-androideabi_libwallet2_api_c.so

View file

@ -0,0 +1 @@
../../../../../../crypto_plugins/flutter_libmonero/scripts/monero_c/release/monero/x86_64-linux-android_libwallet2_api_c.so

@ -1 +1 @@
Subproject commit 2c684cedba6c3d9353c7ea748cadb5a246008027
Subproject commit b25aa48451aeb6f2ea4e9b3831789f6bdbfb90e1

View file

@ -4,6 +4,7 @@ import 'package:stackwallet/utilities/default_nodes.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
import 'package:stackwallet/wallets/crypto_currency/intermediate/cryptonote_currency.dart';
import 'package:monero/monero.dart' as monero;
class Monero extends CryptonoteCurrency {
Monero(super.network) {
@ -20,7 +21,7 @@ class Monero extends CryptonoteCurrency {
@override
bool validateAddress(String address) {
return monero_wallet.validateAddress(address);
return monero.Wallet_addressValid(address, 0);
}
@override

View file

@ -20,7 +20,7 @@ class Wownero extends CryptonoteCurrency {
@override
bool validateAddress(String address) {
return wownero_wallet.validateAddress(address);
return wownero_wallet.addressValid(address);
}
@override

View file

@ -330,7 +330,8 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
// date: DateTime.now().subtract(const Duration(
// days:
// 2))); // subtract a couple days to ensure we have a buffer for SWB
final bufferedCreateHeight = getSeedHeightSync(wallet!.seed.trim());
// TODO(mrcyjanek): implement
final bufferedCreateHeight = 1; //getSeedHeightSync(wallet!.seed.trim());
await info.updateRestoreHeight(
newRestoreHeight: bufferedCreateHeight,
@ -441,7 +442,8 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
// extract seed height from 14 word seed
if (seedLength == 14) {
height = getSeedHeightSync(mnemonic.trim());
// TODO(mrcyjanek): implement
height = 1; // getSeedHeightSync(mnemonic.trim());
} else {
height = max(height, 0);
}

View file

@ -6,9 +6,6 @@ import FlutterMacOS
import Foundation
import connectivity_plus
import cw_monero
import cw_shared_external
import cw_wownero
import desktop_drop
import device_info_plus
import devicelocale
@ -27,9 +24,6 @@ import window_size
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
CwMoneroPlugin.register(with: registry.registrar(forPlugin: "CwMoneroPlugin"))
CwSharedExternalPlugin.register(with: registry.registrar(forPlugin: "CwSharedExternalPlugin"))
CwWowneroPlugin.register(with: registry.registrar(forPlugin: "CwWowneroPlugin"))
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin"))

View file

@ -380,13 +380,6 @@ packages:
relative: true
source: path
version: "0.0.1"
cw_shared_external:
dependency: transitive
description:
path: "crypto_plugins/flutter_libmonero/cw_shared_external"
relative: true
source: path
version: "0.0.1"
cw_wownero:
dependency: "direct main"
description:
@ -1200,6 +1193,15 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.2.0"
monero:
dependency: transitive
description:
path: "."
ref: "342bad5d91d8476f0e32a57ae944f2cfe34d4241"
resolved-ref: "342bad5d91d8476f0e32a57ae944f2cfe34d4241"
url: "https://git.mrcyjanek.net/mrcyjanek/monero.dart"
source: git
version: "0.0.0"
mutex:
dependency: "direct main"
description:

View file

@ -6,11 +6,11 @@ set -e
source ../rust_version.sh
set_rust_to_1671
(cd ../../crypto_plugins/flutter_liblelantus/scripts/macos && ./build_all.sh ) &
(cd ../../crypto_plugins/flutter_libepiccash/scripts/macos && ./build_all.sh ) &
(cd ../../crypto_plugins/flutter_libmonero/scripts/macos/ && ./build_all.sh ) &&
set_rust_to_1720 &&
(cd ../../crypto_plugins/frostdart/scripts/macos && ./build_all.sh ) &
(cd ../../crypto_plugins/flutter_liblelantus/scripts/macos && ./build_all.sh )
(cd ../../crypto_plugins/flutter_libepiccash/scripts/macos && ./build_all.sh )
(cd ../../crypto_plugins/flutter_libmonero/scripts/macos/ && ./build_all.sh )
set_rust_to_1720
(cd ../../crypto_plugins/frostdart/scripts/macos && ./build_all.sh )
wait
echo "Done building"