move amount_converter to cw_core (#588)

Co-authored-by: Serhii <borodenko.sv@gmail.com>
This commit is contained in:
mkyq 2022-11-03 14:45:50 -04:00 committed by GitHub
parent b27b55388c
commit 8e70b611d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 19 deletions

View file

@ -2,7 +2,7 @@ import 'package:cw_haven/api/structs/pending_transaction.dart';
import 'package:cw_haven/api/transaction_history.dart' import 'package:cw_haven/api/transaction_history.dart'
as haven_transaction_history; as haven_transaction_history;
import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/crypto_currency.dart';
// import 'package:cake_wallet/core/amount_converter.dart'; import 'package:cw_core/amount_converter.dart';
import 'package:cw_core/pending_transaction.dart'; import 'package:cw_core/pending_transaction.dart';
class DoubleSpendException implements Exception { class DoubleSpendException implements Exception {
@ -25,17 +25,13 @@ class PendingHavenTransaction with PendingTransaction {
@override @override
String get hex => ''; String get hex => '';
// FIX-ME: AmountConverter
@override @override
String get amountFormatted => ''; String get amountFormatted => AmountConverter.amountIntToString(
// AmountConverter.amountIntToString( cryptoCurrency, pendingTransactionDescription.amount);
// cryptoCurrency, pendingTransactionDescription.amount);
// FIX-ME: AmountConverter
@override @override
String get feeFormatted => ''; String get feeFormatted => AmountConverter.amountIntToString(
// AmountConverter.amountIntToString( cryptoCurrency, pendingTransactionDescription.fee);
// cryptoCurrency, pendingTransactionDescription.fee);
@override @override
Future<void> commit() async { Future<void> commit() async {

View file

@ -2,7 +2,7 @@ import 'package:cw_monero/api/structs/pending_transaction.dart';
import 'package:cw_monero/api/transaction_history.dart' import 'package:cw_monero/api/transaction_history.dart'
as monero_transaction_history; as monero_transaction_history;
import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/crypto_currency.dart';
// import 'package:cake_wallet/core/amount_converter.dart'; import 'package:cw_core/amount_converter.dart';
import 'package:cw_core/pending_transaction.dart'; import 'package:cw_core/pending_transaction.dart';
@ -27,17 +27,13 @@ class PendingMoneroTransaction with PendingTransaction {
String get txKey => pendingTransactionDescription.txKey; String get txKey => pendingTransactionDescription.txKey;
// FIX-ME: AmountConverter
@override @override
String get amountFormatted => ''; String get amountFormatted => AmountConverter.amountIntToString(
// AmountConverter.amountIntToString( CryptoCurrency.xmr, pendingTransactionDescription.amount);
// CryptoCurrency.xmr, pendingTransactionDescription.amount);
// FIX-ME: AmountConverter
@override @override
String get feeFormatted => ''; String get feeFormatted => AmountConverter.amountIntToString(
// AmountConverter.amountIntToString( CryptoCurrency.xmr, pendingTransactionDescription.fee);
// CryptoCurrency.xmr, pendingTransactionDescription.fee);
@override @override
Future<void> commit() async { Future<void> commit() async {

View file

@ -1,5 +1,5 @@
import 'dart:convert'; import 'dart:convert';
import 'package:cake_wallet/core/amount_converter.dart'; import 'package:cw_core/amount_converter.dart';
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
import 'package:cake_wallet/exchange/trade_not_found_exeption.dart'; import 'package:cake_wallet/exchange/trade_not_found_exeption.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';