mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
more wow fixes
This commit is contained in:
parent
a1f2c69153
commit
d3767ed31e
16 changed files with 1636 additions and 4 deletions
BIN
assets/images/wownero.png
Normal file
BIN
assets/images/wownero.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 284 KiB |
5
assets/svg/coin_icons/Wownero.svg
Normal file
5
assets/svg/coin_icons/Wownero.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z" fill="white"/>
|
||||
<path d="M11.9995 0C4.47265 0 -2.05964 7.3766 0.607901 15.9995H4.19818V5.77053L11.9995 13.6735L19.8008 5.77053V16H23.3923C25.9927 7.70373 19.8837 0.00169985 12.0007 0.00169985L11.9995 0Z" fill="#F06923"/>
|
||||
<path d="M6.93212 12V18.2898H2C4.05397 21.7109 7.76562 24 11.9998 24C16.2341 24 19.946 21.7106 22 18.2892H17.0662V12L11.9995 17.1456L6.93212 12Z" fill="#4D4E4E"/>
|
||||
</svg>
|
After Width: | Height: | Size: 610 B |
|
@ -1 +1 @@
|
|||
Subproject commit 4bffa40cb60ad3d98cf0ea5b5d819f3f4895dcd6
|
||||
Subproject commit cb682fab04e215971abe3d0aeb8bb0f6fc28e7d0
|
|
@ -8,6 +8,7 @@ import 'package:cw_core/wallet_type.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_libmonero/monero/monero.dart';
|
||||
import 'package:flutter_libmonero/wownero/wownero.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
|
@ -70,7 +71,6 @@ void main() async {
|
|||
appDirectory = (await getLibraryDirectory());
|
||||
}
|
||||
// FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
|
||||
await Hive.initFlutter(appDirectory.path);
|
||||
if (!(Logging.isArmLinux || Logging.isTestEnv)) {
|
||||
final isar = await Isar.open(
|
||||
[LogSchema],
|
||||
|
@ -114,11 +114,14 @@ void main() async {
|
|||
|
||||
Hive.registerAdapter(NodeAdapter());
|
||||
|
||||
if (!Hive.isAdapterRegistered(WalletInfoAdapter().typeId)) {
|
||||
Hive.registerAdapter(WalletInfoAdapter());
|
||||
}
|
||||
|
||||
Hive.registerAdapter(WalletTypeAdapter());
|
||||
|
||||
Hive.registerAdapter(UnspentCoinsInfoAdapter());
|
||||
await Hive.initFlutter(appDirectory.path);
|
||||
|
||||
await Hive.openBox<dynamic>(DB.boxNameDBInfo);
|
||||
int dbVersion = DB.instance.get<dynamic>(
|
||||
|
@ -129,6 +132,7 @@ void main() async {
|
|||
}
|
||||
|
||||
monero.onStartup();
|
||||
wownero.onStartup();
|
||||
|
||||
// SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||
// overlays: [SystemUiOverlay.bottom]);
|
||||
|
|
|
@ -189,7 +189,7 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
|||
|
||||
// TODO: do actual check to make sure it is a valid mnemonic for monero
|
||||
if (bip39.validateMnemonic(mnemonic) == false &&
|
||||
!(widget.coin == Coin.monero)) {
|
||||
!(widget.coin == Coin.monero || widget.coin == Coin.wownero)) {
|
||||
showFloatingFlushBar(
|
||||
type: FlushBarType.warning,
|
||||
message: "Invalid seed phrase!",
|
||||
|
|
|
@ -534,6 +534,7 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
|||
|
||||
case Coin.epicCash:
|
||||
case Coin.monero:
|
||||
case Coin.wownero:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart';
|
|||
import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/monero/monero_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/wownero/wownero_wallet.dart';
|
||||
import 'package:stackwallet/services/transaction_notification_tracker.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/prefs.dart';
|
||||
|
@ -123,6 +124,14 @@ abstract class CoinServiceAPI {
|
|||
// tracker: tracker,
|
||||
);
|
||||
|
||||
case Coin.wownero:
|
||||
return WowneroWallet(
|
||||
walletId: walletId,
|
||||
walletName: walletName,
|
||||
coin: coin,
|
||||
// tracker: tracker,
|
||||
);
|
||||
|
||||
case Coin.dogecoinTestNet:
|
||||
return DogecoinWallet(
|
||||
walletId: walletId,
|
||||
|
|
1559
lib/services/coins/wownero/wownero_wallet.dart
Normal file
1559
lib/services/coins/wownero/wownero_wallet.dart
Normal file
File diff suppressed because it is too large
Load diff
|
@ -49,6 +49,9 @@ class AddressUtils {
|
|||
case Coin.monero:
|
||||
return RegExp("[a-zA-Z0-9]{95}").hasMatch(address) ||
|
||||
RegExp("[a-zA-Z0-9]{106}").hasMatch(address);
|
||||
case Coin.wownero:
|
||||
return RegExp("[a-zA-Z0-9]{95}").hasMatch(address) ||
|
||||
RegExp("[a-zA-Z0-9]{106}").hasMatch(address);
|
||||
case Coin.bitcoinTestNet:
|
||||
return Address.validateAddress(address, testnet);
|
||||
case Coin.firoTestNet:
|
||||
|
|
|
@ -109,6 +109,7 @@ class _SVG {
|
|||
String get epicCash => "assets/svg/coin_icons/EpicCash.svg";
|
||||
String get firo => "assets/svg/coin_icons/Firo.svg";
|
||||
String get monero => "assets/svg/coin_icons/Monero.svg";
|
||||
String get wownero => "assets/svg/coin_icons/Wownero.svg";
|
||||
|
||||
// TODO provide proper assets
|
||||
String get bitcoinTestnet => "assets/svg/coin_icons/Bitcoin.svg";
|
||||
|
@ -127,6 +128,8 @@ class _SVG {
|
|||
return firo;
|
||||
case Coin.monero:
|
||||
return monero;
|
||||
case Coin.wownero:
|
||||
return wownero;
|
||||
case Coin.bitcoinTestNet:
|
||||
return bitcoinTestnet;
|
||||
case Coin.firoTestNet:
|
||||
|
@ -144,6 +147,7 @@ class _PNG {
|
|||
String get splash => "assets/images/splash.png";
|
||||
|
||||
String get monero => "assets/images/monero.png";
|
||||
String get wownero => "assets/images/wownero.png";
|
||||
String get firo => "assets/images/firo.png";
|
||||
String get dogecoin => "assets/images/doge.png";
|
||||
String get bitcoin => "assets/images/bitcoin.png";
|
||||
|
@ -164,6 +168,8 @@ class _PNG {
|
|||
return firo;
|
||||
case Coin.monero:
|
||||
return monero;
|
||||
case Coin.wownero:
|
||||
return wownero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ Uri getBlockExplorerTransactionUrlFor({
|
|||
throw UnimplementedError("missing block explorer for epic cash");
|
||||
case Coin.monero:
|
||||
return Uri.parse("https://xmrchain.net/tx/$txid");
|
||||
case Coin.wownero:
|
||||
return Uri.parse("https://explore.wownero.com/search?value=$txid");
|
||||
case Coin.firo:
|
||||
return Uri.parse("https://explorer.firo.org/tx/$txid");
|
||||
case Coin.firoTestNet:
|
||||
|
|
|
@ -10,6 +10,7 @@ class _CoinThemeColor {
|
|||
Color get dogecoin => const Color(0xFFFFE079);
|
||||
Color get epicCash => const Color(0xFFC5C7CB);
|
||||
Color get monero => const Color(0xFFFF9E6B);
|
||||
Color get wownero => const Color(0xFFFF9E6B);
|
||||
|
||||
Color forCoin(Coin coin) {
|
||||
switch (coin) {
|
||||
|
@ -26,6 +27,8 @@ class _CoinThemeColor {
|
|||
return firo;
|
||||
case Coin.monero:
|
||||
return monero;
|
||||
case Coin.wownero:
|
||||
return wownero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,9 @@ abstract class Constants {
|
|||
case Coin.monero:
|
||||
values.addAll([25]);
|
||||
break;
|
||||
case Coin.wownero:
|
||||
values.addAll([14]);
|
||||
break;
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
@ -75,6 +78,9 @@ abstract class Constants {
|
|||
|
||||
case Coin.monero:
|
||||
return 120;
|
||||
|
||||
case Coin.wownero:
|
||||
return 120;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,20 @@ abstract class DefaultNodes {
|
|||
isDown: false,
|
||||
);
|
||||
|
||||
// TODO: eventually enable ssl and set scheme to https
|
||||
// currently get certificate failure
|
||||
static NodeModel get wownero => NodeModel(
|
||||
host: "eu-west-2.wow.xmr.pm",
|
||||
port: 34568,
|
||||
name: defaultName,
|
||||
id: _nodeId(Coin.wownero),
|
||||
useSSL: false,
|
||||
enabled: true,
|
||||
coinName: Coin.wownero.name,
|
||||
isFailover: true,
|
||||
isDown: false,
|
||||
);
|
||||
|
||||
static NodeModel get epicCash => NodeModel(
|
||||
host: "http://epiccash.stackwallet.com",
|
||||
port: 3413,
|
||||
|
@ -133,6 +147,9 @@ abstract class DefaultNodes {
|
|||
case Coin.monero:
|
||||
return monero;
|
||||
|
||||
case Coin.wownero:
|
||||
return wownero;
|
||||
|
||||
case Coin.bitcoinTestNet:
|
||||
return bitcoinTestnet;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart'
|
|||
as epic;
|
||||
import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as firo;
|
||||
import 'package:stackwallet/services/coins/monero/monero_wallet.dart' as xmr;
|
||||
import 'package:stackwallet/services/coins/wownero/wownero_wallet.dart' as wow;
|
||||
|
||||
enum Coin {
|
||||
bitcoin,
|
||||
|
@ -12,6 +13,7 @@ enum Coin {
|
|||
epicCash,
|
||||
firo,
|
||||
monero,
|
||||
wownero,
|
||||
|
||||
///
|
||||
///
|
||||
|
@ -38,6 +40,8 @@ extension CoinExt on Coin {
|
|||
return "Firo";
|
||||
case Coin.monero:
|
||||
return "Monero";
|
||||
case Coin.wownero:
|
||||
return "Wownero";
|
||||
case Coin.bitcoinTestNet:
|
||||
return "tBitcoin";
|
||||
case Coin.firoTestNet:
|
||||
|
@ -59,6 +63,8 @@ extension CoinExt on Coin {
|
|||
return "FIRO";
|
||||
case Coin.monero:
|
||||
return "XMR";
|
||||
case Coin.wownero:
|
||||
return "WOW";
|
||||
case Coin.bitcoinTestNet:
|
||||
return "tBTC";
|
||||
case Coin.firoTestNet:
|
||||
|
@ -81,6 +87,8 @@ extension CoinExt on Coin {
|
|||
return "firo";
|
||||
case Coin.monero:
|
||||
return "monero";
|
||||
case Coin.wownero:
|
||||
return "wownero";
|
||||
case Coin.bitcoinTestNet:
|
||||
return "bitcoin";
|
||||
case Coin.firoTestNet:
|
||||
|
@ -102,6 +110,7 @@ extension CoinExt on Coin {
|
|||
|
||||
case Coin.epicCash:
|
||||
case Coin.monero:
|
||||
case Coin.wownero:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -125,6 +134,9 @@ extension CoinExt on Coin {
|
|||
|
||||
case Coin.monero:
|
||||
return xmr.MINIMUM_CONFIRMATIONS;
|
||||
|
||||
case Coin.wownero:
|
||||
return wow.MINIMUM_CONFIRMATIONS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,9 @@ dependencies:
|
|||
cw_monero:
|
||||
path: ./crypto_plugins/flutter_libmonero/cw_monero
|
||||
|
||||
cw_wownero:
|
||||
path: ./crypto_plugins/flutter_libmonero/cw_wownero
|
||||
|
||||
cw_core:
|
||||
path: ./crypto_plugins/flutter_libmonero/cw_core
|
||||
|
||||
|
@ -177,6 +180,7 @@ flutter:
|
|||
- assets/svg/clipboard.svg
|
||||
- assets/images/stack.png
|
||||
- assets/images/monero.png
|
||||
- assets/images/wownero.png
|
||||
- assets/images/firo.png
|
||||
- assets/images/doge.png
|
||||
- assets/images/bitcoin.png
|
||||
|
@ -265,6 +269,7 @@ flutter:
|
|||
- assets/svg/coin_icons/EpicCash.svg
|
||||
- assets/svg/coin_icons/Firo.svg
|
||||
- assets/svg/coin_icons/Monero.svg
|
||||
- assets/svg/coin_icons/Wownero.svg
|
||||
# lottie animations
|
||||
- assets/lottie/test.json
|
||||
- assets/lottie/test2.json
|
||||
|
|
Loading…
Reference in a new issue