forked from github-such-software/hash-wallet
Fix orphan references after shitcoin nuke (build round 2) #12
@@ -1,5 +1,4 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:hash_wallet/exchange/provider/jupiter_exchange_provider.dart';
|
|
||||||
import 'package:hash_wallet/exchange/provider/near_Intents_exchange_provider.dart';
|
import 'package:hash_wallet/exchange/provider/near_Intents_exchange_provider.dart';
|
||||||
import 'package:hash_wallet/exchange/provider/simpleswap_exchange_provider.dart';
|
import 'package:hash_wallet/exchange/provider/simpleswap_exchange_provider.dart';
|
||||||
import 'package:hash_wallet/exchange/provider/swapsxyz_exchange_provider.dart';
|
import 'package:hash_wallet/exchange/provider/swapsxyz_exchange_provider.dart';
|
||||||
@@ -64,8 +63,6 @@ class TradeMonitor {
|
|||||||
return XOSwapExchangeProvider();
|
return XOSwapExchangeProvider();
|
||||||
case ExchangeProviderDescription.swapsXyz:
|
case ExchangeProviderDescription.swapsXyz:
|
||||||
return SwapsXyzExchangeProvider();
|
return SwapsXyzExchangeProvider();
|
||||||
case ExchangeProviderDescription.jupiter:
|
|
||||||
return JupiterExchangeProvider();
|
|
||||||
case ExchangeProviderDescription.nearIntents:
|
case ExchangeProviderDescription.nearIntents:
|
||||||
return NearIntentsExchangeProvider();
|
return NearIntentsExchangeProvider();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import 'package:hash_wallet/src/screens/wallet_connect/widgets/bottom_sheet/bott
|
|||||||
import 'package:hash_wallet/src/screens/wallet_connect/services/bottom_sheet_service.dart';
|
import 'package:hash_wallet/src/screens/wallet_connect/services/bottom_sheet_service.dart';
|
||||||
import 'package:hash_wallet/src/widgets/evm_switcher.dart';
|
import 'package:hash_wallet/src/widgets/evm_switcher.dart';
|
||||||
import 'package:hash_wallet/src/widgets/gradient_background.dart';
|
import 'package:hash_wallet/src/widgets/gradient_background.dart';
|
||||||
import 'package:hash_wallet/src/widgets/haven_wallet_removal_popup.dart';
|
|
||||||
import 'package:hash_wallet/src/widgets/services_updates_widget.dart';
|
import 'package:hash_wallet/src/widgets/services_updates_widget.dart';
|
||||||
import 'package:hash_wallet/src/widgets/vulnerable_seeds_popup.dart';
|
import 'package:hash_wallet/src/widgets/vulnerable_seeds_popup.dart';
|
||||||
import 'package:hash_wallet/utils/device_info.dart';
|
import 'package:hash_wallet/utils/device_info.dart';
|
||||||
@@ -346,8 +345,6 @@ class _DashboardPageView extends BasePage {
|
|||||||
|
|
||||||
_showVulnerableSeedsPopup(context);
|
_showVulnerableSeedsPopup(context);
|
||||||
|
|
||||||
_showHavenPopup(context);
|
|
||||||
|
|
||||||
var needToPresentYat = false;
|
var needToPresentYat = false;
|
||||||
|
|
||||||
rootKey.currentState?.isInactive.listen(
|
rootKey.currentState?.isInactive.listen(
|
||||||
@@ -423,21 +420,4 @@ class _DashboardPageView extends BasePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _showHavenPopup(BuildContext context) async {
|
|
||||||
final List<String> havenWalletList = await dashboardViewModel.checkForHavenWallets();
|
|
||||||
|
|
||||||
if (havenWalletList.isNotEmpty) {
|
|
||||||
Future<void>.delayed(
|
|
||||||
Duration(seconds: 1),
|
|
||||||
() {
|
|
||||||
showPopUp<void>(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return HavenWalletRemovalPopup(havenWalletList);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,52 +333,6 @@ class CryptoBalanceWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
if (dashboardViewModel.showZcashMissingFundsCard) ...[
|
|
||||||
SizedBox(height: 10),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
|
|
||||||
child: InfoCard(
|
|
||||||
title: S.of(context).zcash_card_missing_funds,
|
|
||||||
description: S.of(context).zcash_card_description,
|
|
||||||
leftButtonTitle: S.of(context).zcash_card_dismiss,
|
|
||||||
rightButtonTitle: S.of(context).zcash_card_scan,
|
|
||||||
image: 'assets/new-ui/crypto_full_icons/zcash.svg',
|
|
||||||
leftButtonAction: () => _dismissZcash(context),
|
|
||||||
rightButtonAction: () => _rescanInternalChangeZcash(context),
|
|
||||||
hintWidget: GestureDetector(
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: () => launchUrl(
|
|
||||||
Uri.parse("https://github.com/Such-Software/hash-wallet"),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
S.of(context).learn_more,
|
|
||||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
|
||||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
||||||
height: 1,
|
|
||||||
),
|
|
||||||
softWrap: true,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
if (dashboardViewModel.showDecredInfoCard) ...[
|
|
||||||
SizedBox(height: 10),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
|
|
||||||
child: InfoCard(
|
|
||||||
title: S.of(context).synchronizing,
|
|
||||||
description: S.of(context).decred_info_card_details,
|
|
||||||
image: 'assets/images/crypto/decred.webp',
|
|
||||||
leftButtonTitle: S.of(context).litecoin_mweb_dismiss,
|
|
||||||
rightButtonTitle: S.of(context).learn_more,
|
|
||||||
leftButtonAction: () => dashboardViewModel.dismissDecredInfoCard(),
|
|
||||||
rightButtonAction: () => launchUrl(
|
|
||||||
Uri.parse("https://github.com/Such-Software/hash-wallet")),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
if (dashboardViewModel.showPayjoinCard) ...[
|
if (dashboardViewModel.showPayjoinCard) ...[
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
@@ -492,22 +446,6 @@ class CryptoBalanceWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
dashboardViewModel.setMwebEnabled();
|
dashboardViewModel.setMwebEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _rescanInternalChangeZcash(BuildContext context) async {
|
|
||||||
dashboardViewModel.rescanInternalChangeZcash();
|
|
||||||
await showPopUp<void>(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) => AlertWithOneAction(
|
|
||||||
alertTitle: S.of(context).alert_notice,
|
|
||||||
alertContent: S.of(context).zcash_card_warning,
|
|
||||||
buttonText: S.of(context).understand,
|
|
||||||
buttonAction: () {
|
|
||||||
Navigator.of(context).pop();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Future<void> _dismissMweb(BuildContext context) async {
|
Future<void> _dismissMweb(BuildContext context) async {
|
||||||
await showPopUp<void>(
|
await showPopUp<void>(
|
||||||
@@ -522,18 +460,4 @@ class CryptoBalanceWidget extends StatelessWidget {
|
|||||||
));
|
));
|
||||||
dashboardViewModel.dismissMweb();
|
dashboardViewModel.dismissMweb();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _dismissZcash(BuildContext context) async {
|
|
||||||
await showPopUp<void>(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) => AlertWithOneAction(
|
|
||||||
alertTitle: S.of(context).alert_notice,
|
|
||||||
alertContent: S.of(context).zcash_card_enable_later,
|
|
||||||
buttonText: S.of(context).understand,
|
|
||||||
buttonAction: () {
|
|
||||||
Navigator.of(context).pop();
|
|
||||||
},
|
|
||||||
));
|
|
||||||
dashboardViewModel.dismissZcash();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,14 +110,6 @@ class ConnectionSyncPage extends BasePage {
|
|||||||
onChanged: (val) {
|
onChanged: (val) {
|
||||||
_connectionSyncViewModel.setUseBscScan(val);
|
_connectionSyncViewModel.setUseBscScan(val);
|
||||||
}),
|
}),
|
||||||
if (_connectionSyncViewModel.canUseTronGrid)
|
|
||||||
ListItemToggle(
|
|
||||||
keyValue: "can_use_trongrid",
|
|
||||||
label: S.of(context).trongrid_history,
|
|
||||||
value: _connectionSyncViewModel.useTronGrid,
|
|
||||||
onChanged: (val) {
|
|
||||||
_connectionSyncViewModel.setUseTronGrid(val);
|
|
||||||
}),
|
|
||||||
if (_connectionSyncViewModel.canUseMempoolFeeAPI)
|
if (_connectionSyncViewModel.canUseMempoolFeeAPI)
|
||||||
ListItemToggle(
|
ListItemToggle(
|
||||||
keyValue: "enable_mempool_api",
|
keyValue: "enable_mempool_api",
|
||||||
|
|||||||
@@ -89,11 +89,9 @@ class _PaymentConfirmationContent extends StatelessWidget {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks if flow type is token selection (EVM, Solana, or Tron)
|
/// Checks if flow type is token selection (EVM only — Solana/Tron removed).
|
||||||
bool _isTokenSelectionFlow(PaymentFlowType type) {
|
bool _isTokenSelectionFlow(PaymentFlowType type) {
|
||||||
return type == PaymentFlowType.evmNetworkSelection ||
|
return type == PaymentFlowType.evmNetworkSelection;
|
||||||
type == PaymentFlowType.solanaTokenSelection ||
|
|
||||||
type == PaymentFlowType.tronTokenSelection;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
import 'package:hash_wallet/src/widgets/alert_background.dart';
|
|
||||||
import 'package:hash_wallet/src/widgets/alert_close_button.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class HavenWalletRemovalPopup extends StatelessWidget {
|
|
||||||
final List<String> affectedWalletNames;
|
|
||||||
|
|
||||||
const HavenWalletRemovalPopup(this.affectedWalletNames, {Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Stack(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
|
||||||
AlertBackground(
|
|
||||||
child: AlertDialog(
|
|
||||||
insetPadding: EdgeInsets.only(left: 16, right: 16, bottom: 48),
|
|
||||||
elevation: 0.0,
|
|
||||||
contentPadding: EdgeInsets.zero,
|
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(30))),
|
|
||||||
content: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(30.0),
|
|
||||||
gradient: LinearGradient(colors: [
|
|
||||||
Theme.of(context).colorScheme.primaryContainer,
|
|
||||||
Theme.of(context).colorScheme.secondaryContainer,
|
|
||||||
], begin: Alignment.centerLeft, end: Alignment.centerRight)),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
SingleChildScrollView(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 16.0),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
child: DefaultTextStyle(
|
|
||||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
|
||||||
decoration: TextDecoration.none,
|
|
||||||
fontSize: 24.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
|
|
||||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
||||||
),
|
|
||||||
child: Text("Emergency Notice"),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SingleChildScrollView(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(top: 48, bottom: 16),
|
|
||||||
child: Container(
|
|
||||||
width: double.maxFinite,
|
|
||||||
child: Column(
|
|
||||||
children: <Widget>[
|
|
||||||
ConstrainedBox(
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
maxHeight: MediaQuery.of(context).size.height * 0.7,
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
"It looks like you have Haven wallets in your list. Haven is getting removed in the Hash Wallet fork, and you currently have Haven in the following wallets:\n\n[${affectedWalletNames.join(", ")}]\n\nPlease move your funds to other wallet, as you will lose access to your Haven funds in next update.\n\nFor assistance, please use the in-app support or open an issue at github.com/Such-Software/hash-wallet",
|
|
||||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
|
||||||
decoration: TextDecoration.none,
|
|
||||||
fontSize: 16.0,
|
|
||||||
|
|
||||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
AlertCloseButton(bottom: 30)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,6 @@ import 'package:hash_wallet/exchange/provider/changenow_exchange_provider.dart';
|
|||||||
import 'package:hash_wallet/exchange/provider/exchange_provider.dart';
|
import 'package:hash_wallet/exchange/provider/exchange_provider.dart';
|
||||||
import 'package:hash_wallet/exchange/provider/exolix_exchange_provider.dart';
|
import 'package:hash_wallet/exchange/provider/exolix_exchange_provider.dart';
|
||||||
import 'package:hash_wallet/exchange/provider/letsexchange_exchange_provider.dart';
|
import 'package:hash_wallet/exchange/provider/letsexchange_exchange_provider.dart';
|
||||||
import 'package:hash_wallet/exchange/provider/jupiter_exchange_provider.dart';
|
|
||||||
import 'package:hash_wallet/exchange/provider/near_Intents_exchange_provider.dart';
|
import 'package:hash_wallet/exchange/provider/near_Intents_exchange_provider.dart';
|
||||||
import 'package:hash_wallet/exchange/provider/swapsxyz_exchange_provider.dart';
|
import 'package:hash_wallet/exchange/provider/swapsxyz_exchange_provider.dart';
|
||||||
import 'package:hash_wallet/exchange/provider/swaptrade_exchange_provider.dart';
|
import 'package:hash_wallet/exchange/provider/swaptrade_exchange_provider.dart';
|
||||||
@@ -77,9 +76,6 @@ abstract class TradeDetailsViewModelBase with Store {
|
|||||||
case ExchangeProviderDescription.swapsXyz:
|
case ExchangeProviderDescription.swapsXyz:
|
||||||
_provider = SwapsXyzExchangeProvider();
|
_provider = SwapsXyzExchangeProvider();
|
||||||
break;
|
break;
|
||||||
case ExchangeProviderDescription.jupiter:
|
|
||||||
_provider = JupiterExchangeProvider();
|
|
||||||
break;
|
|
||||||
case ExchangeProviderDescription.nearIntents:
|
case ExchangeProviderDescription.nearIntents:
|
||||||
_provider = NearIntentsExchangeProvider();
|
_provider = NearIntentsExchangeProvider();
|
||||||
break;
|
break;
|
||||||
@@ -119,8 +115,6 @@ abstract class TradeDetailsViewModelBase with Store {
|
|||||||
return 'https://orders.xoswap.com/${trade.id}';
|
return 'https://orders.xoswap.com/${trade.id}';
|
||||||
case ExchangeProviderDescription.swapsXyz:
|
case ExchangeProviderDescription.swapsXyz:
|
||||||
return 'https://scan.swaps.xyz/transactions/${trade.id}';
|
return 'https://scan.swaps.xyz/transactions/${trade.id}';
|
||||||
case ExchangeProviderDescription.jupiter:
|
|
||||||
return 'https://solscan.io/tx/${trade.txId}';
|
|
||||||
case ExchangeProviderDescription.nearIntents:
|
case ExchangeProviderDescription.nearIntents:
|
||||||
return 'https://explorer.near-intents.org/transactions/${trade.id}';
|
return 'https://explorer.near-intents.org/transactions/${trade.id}';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -517,7 +517,6 @@ import 'package:hash_wallet/view_model/send/output.dart';
|
|||||||
import 'package:cw_core/crypto_currency.dart';
|
import 'package:cw_core/crypto_currency.dart';
|
||||||
import 'package:hash_wallet/core/key_service.dart';
|
import 'package:hash_wallet/core/key_service.dart';
|
||||||
import 'package:hash_wallet/core/secure_storage.dart';
|
import 'package:hash_wallet/core/secure_storage.dart';
|
||||||
import 'package:hash_wallet/entities/haven_seed_store.dart';
|
|
||||||
import 'package:cw_core/cake_hive.dart';
|
import 'package:cw_core/cake_hive.dart';
|
||||||
import 'package:cw_core/wallet_info.dart';
|
import 'package:cw_core/wallet_info.dart';
|
||||||
import 'package:cw_core/wallet_type.dart';
|
import 'package:cw_core/wallet_type.dart';
|
||||||
@@ -654,7 +653,6 @@ abstract class Wownero {
|
|||||||
Map<String, String> pendingTransactionInfo(Object transaction);
|
Map<String, String> pendingTransactionInfo(Object transaction);
|
||||||
String getLegacySeed(Object wallet, String langName);
|
String getLegacySeed(Object wallet, String langName);
|
||||||
Map<String, List<int>> debugCallLength();
|
Map<String, List<int>> debugCallLength();
|
||||||
Future<void> backupSeeds(Box<HavenSeedStore> havenSeedStore);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class WowneroSubaddressList {
|
abstract class WowneroSubaddressList {
|
||||||
|
|||||||
Reference in New Issue
Block a user