mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
monero.dart clean
This commit is contained in:
parent
cfe06f5b13
commit
c78fba7b36
15 changed files with 40 additions and 25 deletions
3
.fvmrc
Normal file
3
.fvmrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"flutter": "3.16.0"
|
||||||
|
}
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -59,3 +59,6 @@ libtor_ffi.dll
|
||||||
flutter_libsparkmobile.dll
|
flutter_libsparkmobile.dll
|
||||||
secp256k1.dll
|
secp256k1.dll
|
||||||
/libisar.so
|
/libisar.so
|
||||||
|
|
||||||
|
# FVM Version Cache
|
||||||
|
.fvm/
|
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"dart.lineLength": 80,
|
"dart.lineLength": 80,
|
||||||
|
"dart.flutterSdkPath": ".fvm/versions/3.16.0"
|
||||||
}
|
}
|
|
@ -45,7 +45,12 @@ android {
|
||||||
lintOptions {
|
lintOptions {
|
||||||
disable 'InvalidPackage'
|
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 {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.cypherstack.stackwallet"
|
applicationId "com.cypherstack.stackwallet"
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:fullBackupContent="false">
|
android:fullBackupContent="false"
|
||||||
|
android:extractNativeLibs="true">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
../../../../../../crypto_plugins/flutter_libmonero/scripts/monero_c/release/monero/aarch64-linux-android_libwallet2_api_c.so
|
|
@ -0,0 +1 @@
|
||||||
|
../../../../../../crypto_plugins/flutter_libmonero/scripts/monero_c/release/monero/arm-linux-androideabi_libwallet2_api_c.so
|
|
@ -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
|
|
@ -4,6 +4,7 @@ import 'package:stackwallet/utilities/default_nodes.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
|
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
|
||||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/cryptonote_currency.dart';
|
import 'package:stackwallet/wallets/crypto_currency/intermediate/cryptonote_currency.dart';
|
||||||
|
import 'package:monero/monero.dart' as monero;
|
||||||
|
|
||||||
class Monero extends CryptonoteCurrency {
|
class Monero extends CryptonoteCurrency {
|
||||||
Monero(super.network) {
|
Monero(super.network) {
|
||||||
|
@ -20,7 +21,7 @@ class Monero extends CryptonoteCurrency {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool validateAddress(String address) {
|
bool validateAddress(String address) {
|
||||||
return monero_wallet.validateAddress(address);
|
return monero.Wallet_addressValid(address, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -20,7 +20,7 @@ class Wownero extends CryptonoteCurrency {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool validateAddress(String address) {
|
bool validateAddress(String address) {
|
||||||
return wownero_wallet.validateAddress(address);
|
return wownero_wallet.addressValid(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -330,7 +330,8 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
||||||
// date: DateTime.now().subtract(const Duration(
|
// date: DateTime.now().subtract(const Duration(
|
||||||
// days:
|
// days:
|
||||||
// 2))); // subtract a couple days to ensure we have a buffer for SWB
|
// 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(
|
await info.updateRestoreHeight(
|
||||||
newRestoreHeight: bufferedCreateHeight,
|
newRestoreHeight: bufferedCreateHeight,
|
||||||
|
@ -441,7 +442,8 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
||||||
|
|
||||||
// extract seed height from 14 word seed
|
// extract seed height from 14 word seed
|
||||||
if (seedLength == 14) {
|
if (seedLength == 14) {
|
||||||
height = getSeedHeightSync(mnemonic.trim());
|
// TODO(mrcyjanek): implement
|
||||||
|
height = 1; // getSeedHeightSync(mnemonic.trim());
|
||||||
} else {
|
} else {
|
||||||
height = max(height, 0);
|
height = max(height, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,6 @@ import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import connectivity_plus
|
import connectivity_plus
|
||||||
import cw_monero
|
|
||||||
import cw_shared_external
|
|
||||||
import cw_wownero
|
|
||||||
import desktop_drop
|
import desktop_drop
|
||||||
import device_info_plus
|
import device_info_plus
|
||||||
import devicelocale
|
import devicelocale
|
||||||
|
@ -27,9 +24,6 @@ import window_size
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
|
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"))
|
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
|
||||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||||
DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin"))
|
DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin"))
|
||||||
|
|
16
pubspec.lock
16
pubspec.lock
|
@ -380,13 +380,6 @@ packages:
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.0.1"
|
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:
|
cw_wownero:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -1200,6 +1193,15 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
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:
|
mutex:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -6,11 +6,11 @@ set -e
|
||||||
source ../rust_version.sh
|
source ../rust_version.sh
|
||||||
set_rust_to_1671
|
set_rust_to_1671
|
||||||
|
|
||||||
(cd ../../crypto_plugins/flutter_liblelantus/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_libepiccash/scripts/macos && ./build_all.sh )
|
||||||
(cd ../../crypto_plugins/flutter_libmonero/scripts/macos/ && ./build_all.sh ) &&
|
(cd ../../crypto_plugins/flutter_libmonero/scripts/macos/ && ./build_all.sh )
|
||||||
set_rust_to_1720 &&
|
set_rust_to_1720
|
||||||
(cd ../../crypto_plugins/frostdart/scripts/macos && ./build_all.sh ) &
|
(cd ../../crypto_plugins/frostdart/scripts/macos && ./build_all.sh )
|
||||||
|
|
||||||
wait
|
wait
|
||||||
echo "Done building"
|
echo "Done building"
|
||||||
|
|
Loading…
Reference in a new issue