Skip to content

Commit 9cf1686

Browse files
committed
Remove fund/daa/strategy support for now
1 parent 7ddc094 commit 9cf1686

File tree

1 file changed

+3
-34
lines changed

1 file changed

+3
-34
lines changed

rotkehlchen/exchanges/iconomi.py

+3-34
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
logger = logging.getLogger(__name__)
2525
log = RotkehlchenLogsAdapter(logger)
2626

27-
SUPPORTED_FUND_TICKERS = ('BLX',)
28-
2927

3028
def iconomi_asset(asset: str) -> Asset:
3129
return Asset(asset.upper())
@@ -41,25 +39,13 @@ def trade_from_iconomi(raw_trade: Dict) -> Trade:
4139

4240
timestamp = raw_trade['timestamp']
4341

44-
if (
45-
raw_trade['type'] == 'buy_fund' and
46-
raw_trade['target_ticker'] not in SUPPORTED_FUND_TICKERS
47-
):
48-
raise UnknownAsset(raw_trade['target_ticker'])
49-
50-
if (
51-
raw_trade['type'] == 'sell_fund' and
52-
raw_trade['source_ticker'] not in SUPPORTED_FUND_TICKERS
53-
):
54-
raise UnknownAsset(raw_trade['target_ticker'])
55-
56-
if raw_trade['type'] in ('buy_asset', 'buy_fund'):
42+
if raw_trade['type'] == 'buy_asset':
5743
trade_type = TradeType.BUY
5844
tx_asset = Asset(raw_trade['target_ticker'])
5945
tx_amount = raw_trade['target_amount']
6046
native_asset = Asset(raw_trade['source_ticker'])
6147
native_amount = raw_trade['source_amount']
62-
else:
48+
elif raw_trade['type'] == 'sell_asset':
6349
trade_type = TradeType.SELL
6450
tx_asset = Asset(raw_trade['source_ticker'])
6551
tx_amount = raw_trade['source_amount']
@@ -204,23 +190,6 @@ def query_balances(self, **kwargs: Any) -> Tuple[Optional[Dict[Asset, Dict[str,
204190
f' Ignoring its balance query.',
205191
)
206192

207-
for balance_info in resp_info['daaList']:
208-
ticker = balance_info['ticker']
209-
try:
210-
if ticker not in SUPPORTED_FUND_TICKERS:
211-
raise UnknownAsset(ticker)
212-
213-
asset = iconomi_asset(ticker)
214-
balances[asset] = {
215-
'amount': balance_info['balance'],
216-
'usd_value': balance_info['value'],
217-
}
218-
except UnknownAsset:
219-
self.msg_aggregator.add_warning(
220-
f'Found unsupported ICONOMI strategy {ticker}. '
221-
f' Ignoring its balance query.',
222-
)
223-
224193
return (balances, "")
225194

226195
def query_online_trade_history(
@@ -251,7 +220,7 @@ def query_online_trade_history(
251220
if timestamp and timestamp > end_ts:
252221
continue
253222

254-
if tx['type'] in ('buy_asset', 'sell_asset', 'buy_fund', 'sell_fund'):
223+
if tx['type'] in ('buy_asset', 'sell_asset'):
255224
try:
256225
trades.append(trade_from_iconomi(tx))
257226
except UnknownAsset:

0 commit comments

Comments
 (0)