mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
fix for building monero.com
This commit is contained in:
parent
9b33e682f4
commit
93f6dd4cee
3 changed files with 7 additions and 3 deletions
|
@ -248,6 +248,9 @@ class CWBitcoin extends Bitcoin {
|
|||
@override
|
||||
List<ReceivePageOption> getBitcoinReceivePageOptions() => BitcoinReceivePageOption.all;
|
||||
|
||||
@override
|
||||
List<ReceivePageOption> getLitecoinReceivePageOptions() => BitcoinReceivePageOption.allLitecoin;
|
||||
|
||||
@override
|
||||
BitcoinAddressType getBitcoinAddressType(ReceivePageOption option) {
|
||||
switch (option) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:cake_wallet/bitcoin/bitcoin.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_receive_page_option.dart';
|
||||
import 'package:cw_core/receive_page_option.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
|
@ -17,7 +16,8 @@ abstract class ReceiveOptionViewModelBase with Store {
|
|||
? bitcoin!.getSelectedAddressType(_wallet)
|
||||
: ReceivePageOption.mainnet),
|
||||
_options = [] {
|
||||
switch (_wallet.type) {
|
||||
final walletType = _wallet.type;
|
||||
switch (walletType) {
|
||||
case WalletType.bitcoin:
|
||||
_options = [
|
||||
...bitcoin!.getBitcoinReceivePageOptions(),
|
||||
|
@ -26,7 +26,7 @@ abstract class ReceiveOptionViewModelBase with Store {
|
|||
break;
|
||||
case WalletType.litecoin:
|
||||
_options = [
|
||||
...BitcoinReceivePageOption.allLitecoin,
|
||||
...bitcoin!.getLitecoinReceivePageOptions()
|
||||
...ReceivePageOptions.where((element) => element != ReceivePageOption.mainnet)
|
||||
];
|
||||
break;
|
||||
|
|
|
@ -196,6 +196,7 @@ abstract class Bitcoin {
|
|||
Future<void> setAddressType(Object wallet, dynamic option);
|
||||
ReceivePageOption getSelectedAddressType(Object wallet);
|
||||
List<ReceivePageOption> getBitcoinReceivePageOptions();
|
||||
List<ReceivePageOption> getLitecoinReceivePageOptions();
|
||||
BitcoinAddressType getBitcoinAddressType(ReceivePageOption option);
|
||||
bool hasSelectedSilentPayments(Object wallet);
|
||||
bool isBitcoinReceivePageOption(ReceivePageOption option);
|
||||
|
|
Loading…
Reference in a new issue