mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-21 06:18:42 +02:00
CWA-169 | removed setup_locator and got the box as parameter in MorphTokenExchangeProvider
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user