hopefully builds

This commit is contained in:
fosse 2024-02-23 12:46:17 -05:00
parent 729ef79246
commit c2664d2658
6 changed files with 16 additions and 8 deletions

View file

@ -1,7 +1,7 @@
import 'dart:io'; import 'dart:io';
import 'package:bitcoin_base/bitcoin_base.dart'; import 'package:bitcoin_base/bitcoin_base.dart';
import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; import 'package:cw_bitcoin/bitcoin_mnemonic.dart';
import 'package:cw_bitcoin/bitcoin_mnemonic_is_incorrect_exception.dart'; import 'package:cw_bitcoin/mnemonic_is_incorrect_exception.dart';
import 'package:cw_bitcoin/bitcoin_wallet_creation_credentials.dart'; import 'package:cw_bitcoin/bitcoin_wallet_creation_credentials.dart';
import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/unspent_coins_info.dart';
import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_base.dart';
@ -24,7 +24,7 @@ class LightningWalletService extends WalletService<BitcoinNewWalletCredentials,
WalletType getType() => WalletType.lightning; WalletType getType() => WalletType.lightning;
@override @override
Future<LightningWallet> create(BitcoinNewWalletCredentials credentials) async { Future<LightningWallet> create(BitcoinNewWalletCredentials credentials, {bool? isTestnet}) async {
final wallet = await LightningWalletBase.create( final wallet = await LightningWalletBase.create(
mnemonic: await generateMnemonic(), mnemonic: await generateMnemonic(),
password: credentials.password!, password: credentials.password!,
@ -93,7 +93,7 @@ class LightningWalletService extends WalletService<BitcoinNewWalletCredentials,
} }
@override @override
Future<LightningWallet> restoreFromKeys(BitcoinRestoreWalletFromWIFCredentials credentials) async => Future<LightningWallet> restoreFromKeys(BitcoinRestoreWalletFromWIFCredentials credentials, {bool? isTestnet}) async =>
throw UnimplementedError(); throw UnimplementedError();
@override @override

View file

@ -36,4 +36,10 @@ class CWBitcoinCash extends BitcoinCash {
@override @override
TransactionPriority getBitcoinCashTransactionPrioritySlow() => TransactionPriority getBitcoinCashTransactionPrioritySlow() =>
BitcoinCashTransactionPriority.slow; BitcoinCashTransactionPriority.slow;
@override
String getMnemonic(int? strength) => throw UnimplementedError();
@override
Uint8List getSeedFromMnemonic(String seed) => throw UnimplementedError();
} }

View file

@ -1,4 +1,3 @@
import 'package:cake_wallet/entities/receive_page_option.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';

View file

@ -10,6 +10,7 @@ import 'package:cake_wallet/utils/show_bar.dart';
import 'package:cake_wallet/view_model/dashboard/receive_option_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/receive_option_view_model.dart';
import 'package:cake_wallet/view_model/lightning_view_model.dart'; import 'package:cake_wallet/view_model/lightning_view_model.dart';
import 'package:cw_core/receive_page_option.dart'; import 'package:cw_core/receive_page_option.dart';
import 'package:cw_lightning/lightning_receive_page_option.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
@ -225,14 +226,14 @@ class LightningReceiveOnchainPage extends BasePage {
reaction((_) => receiveOptionViewModel.selectedReceiveOption, (ReceivePageOption option) async { reaction((_) => receiveOptionViewModel.selectedReceiveOption, (ReceivePageOption option) async {
switch (option) { switch (option) {
case ReceivePageOption.lightningInvoice: case LightningReceivePageOption.lightningInvoice:
Navigator.popAndPushNamed( Navigator.popAndPushNamed(
context, context,
Routes.lightningInvoice, Routes.lightningInvoice,
arguments: [ReceivePageOption.lightningInvoice], arguments: [LightningReceivePageOption.lightningInvoice],
); );
break; break;
case ReceivePageOption.lightningOnchain: case LightningReceivePageOption.lightningOnchain:
break; break;
default: default:
break; break;

View file

@ -43,6 +43,7 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
case WalletType.haven: case WalletType.haven:
case WalletType.nano: case WalletType.nano:
case WalletType.banano: case WalletType.banano:
case WalletType.lightning:
return false; return false;
} }
} }

View file

@ -1,12 +1,13 @@
import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/entities/fiat_currency.dart'; import 'package:cake_wallet/entities/fiat_currency.dart';
import 'package:cake_wallet/entities/receive_page_option.dart';
import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/view_model/lightning_view_model.dart'; import 'package:cake_wallet/view_model/lightning_view_model.dart';
import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/crypto_currency.dart';
import 'package:cw_core/currency.dart'; import 'package:cw_core/currency.dart';
import 'package:cw_core/receive_page_option.dart';
import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_base.dart';
import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/wallet_type.dart';
import 'package:cw_lightning/lightning_receive_page_option.dart';
import 'package:mobx/mobx.dart'; import 'package:mobx/mobx.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';