Remove haven

This commit is contained in:
M 2022-04-03 16:30:41 +01:00
parent 718ef91749
commit 793f7ba2c1
4 changed files with 2 additions and 43 deletions

View file

@ -1,21 +1,6 @@
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
import 'package:cw_core/crypto_currency.dart';
import 'package:cw_core/monero_amount_format.dart';
import 'package:cw_haven/api/balance_list.dart';
Future<void> updateHavenRate(FiatConversionStore fiatConversionStore) async {
final rate = getRate();
final base = rate.firstWhere((row) => row.getAssetType() == 'XUSD', orElse: () => null);
rate.forEach((row) {
final cur = CryptoCurrency.fromString(row.getAssetType());
final baseRate = moneroAmountToDouble(amount: base.getRate());
final rowRate = moneroAmountToDouble(amount: row.getRate());
if (cur == CryptoCurrency.xusd) {
fiatConversionStore.prices[cur] = 1.0;
return;
}
fiatConversionStore.prices[cur] = baseRate / rowRate;
});
}

View file

@ -13,27 +13,8 @@ import 'package:hive/hive.dart';
import 'package:cw_core/get_height_by_date.dart';
import 'package:cw_core/monero_amount_format.dart';
import 'package:cw_core/monero_transaction_priority.dart';
import 'package:cw_haven/haven_wallet_service.dart';
import 'package:cw_haven/haven_wallet.dart';
import 'package:cw_haven/haven_transaction_info.dart';
import 'package:cw_haven/haven_transaction_history.dart';
import 'package:cw_core/account.dart' as monero_account;
import 'package:cw_haven/api/wallet.dart' as monero_wallet_api;
import 'package:cw_haven/mnemonics/english.dart';
import 'package:cw_haven/mnemonics/chinese_simplified.dart';
import 'package:cw_haven/mnemonics/dutch.dart';
import 'package:cw_haven/mnemonics/german.dart';
import 'package:cw_haven/mnemonics/japanese.dart';
import 'package:cw_haven/mnemonics/russian.dart';
import 'package:cw_haven/mnemonics/spanish.dart';
import 'package:cw_haven/mnemonics/portuguese.dart';
import 'package:cw_haven/mnemonics/french.dart';
import 'package:cw_haven/mnemonics/italian.dart';
import 'package:cw_haven/haven_transaction_creation_credentials.dart';
part 'cw_haven.dart';
Haven haven = CWHaven();
Haven haven;
class Account {
Account({this.id, this.label});

View file

@ -12,7 +12,6 @@ import 'package:cake_wallet/entities/calculate_fiat_amount_raw.dart';
import 'package:cake_wallet/view_model/dashboard/balance_view_model.dart';
import 'package:cw_core/keyable.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:cw_haven/haven_transaction_info.dart';
class TransactionListItem extends ActionListItem with Keyable {
TransactionListItem(
@ -53,12 +52,6 @@ class TransactionListItem extends ActionListItem with Keyable {
price: price);
break;
case WalletType.haven:
final tx = transaction as HavenTransactionInfo;
final asset = CryptoCurrency.fromString(tx.assetType);
final price = balanceViewModel.fiatConvertationStore.prices[asset];
amount = calculateFiatAmountRaw(
cryptoAmount: haven.formatterMoneroAmountToDouble(amount: transaction.amount),
price: price);
break;
default:
break;

View file

@ -21,7 +21,7 @@ MONERO_COM_PACKAGE="com.monero.app"
CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="4.3.9"
CAKEWALLET_BUILD_NUMBER=95
CAKEWALLET_BUILD_NUMBER=97
CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet"
CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet"