CWA-169 | removed setup_locator and got the box as parameter in MorphTokenExchangeProvider

This commit is contained in:
Oleksandr Sobol
2020-02-10 21:35:44 +02:00
parent 163d1c48a4
commit fdeb66e643
7 changed files with 10 additions and 25 deletions
-7
View File
@@ -1,7 +0,0 @@
import 'package:get_it/get_it.dart';
GetIt locator = GetIt.instance;
void setupLocator<T>(T instance) {
locator.registerSingleton<T>(instance);
}
@@ -19,10 +19,9 @@ import 'package:cake_wallet/src/domain/bitcoin_cash/bitcoin_cash_amount_format.d
import 'package:cake_wallet/src/domain/dash/dash_amount_format.dart';
import 'package:cake_wallet/src/domain/ethereum/ethereum_amount_format.dart';
import 'package:cake_wallet/src/domain/litecoin/litecoin_amount_format.dart';
import 'package:cake_wallet/src/domain/common/setup_locator.dart';
class MorphTokenExchangeProvider extends ExchangeProvider {
MorphTokenExchangeProvider()
MorphTokenExchangeProvider({@required this.trades})
: super(
pairList: [
ExchangePair(from: CryptoCurrency.xmr, to: CryptoCurrency.eth),
@@ -61,7 +60,7 @@ class MorphTokenExchangeProvider extends ExchangeProvider {
ExchangePair(from: CryptoCurrency.btc, to: CryptoCurrency.xmr)
]);
final trades = locator.get<Box<Trade>>();
Box<Trade> trades;
static const apiUri = 'https://api.morphtoken.com';
static const _morphURISuffix = '/morph';