Skip to content

Commit

Permalink
Revert Tether USD for now due to various issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz committed Sep 10, 2020
1 parent a8f19a9 commit ce27948
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 63 deletions.
12 changes: 0 additions & 12 deletions assets/src/main/java/bisq/asset/coins/TetherUSDLiquid.java

This file was deleted.

12 changes: 0 additions & 12 deletions assets/src/main/java/bisq/asset/coins/TetherUSDOmni.java

This file was deleted.

11 changes: 0 additions & 11 deletions assets/src/main/java/bisq/asset/tokens/TetherUSDERC20.java

This file was deleted.

3 changes: 0 additions & 3 deletions assets/src/main/resources/META-INF/services/bisq.asset.Asset
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ bisq.asset.coins.Spectrecoin
bisq.asset.coins.Starwels
bisq.asset.coins.SUB1X
bisq.asset.coins.TEO
bisq.asset.coins.TetherUSDLiquid
bisq.asset.coins.TetherUSDOmni
bisq.asset.coins.TurtleCoin
bisq.asset.coins.UnitedCommunityCoin
bisq.asset.coins.Unobtanium
Expand All @@ -125,7 +123,6 @@ bisq.asset.coins.ZeroClassic
bisq.asset.tokens.AugmintEuro
bisq.asset.tokens.DaiStablecoin
bisq.asset.tokens.EtherStone
bisq.asset.tokens.TetherUSDERC20
bisq.asset.tokens.TrueUSD
bisq.asset.tokens.USDCoin
bisq.asset.tokens.VectorspaceAI
26 changes: 1 addition & 25 deletions core/src/main/java/bisq/core/provider/price/PriceProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,7 @@ public Tuple2<Map<String, Long>, Map<String, MarketPrice>> getAll() throws IOExc
final double price = (Double) treeMap.get("price");
// json uses double for our timestampSec long value...
final long timestampSec = MathUtils.doubleToLong((Double) treeMap.get("timestampSec"));

// We do not have support for the case of multiChain assets where a common price ticker used for
// different flavours of the asset. It would be quite a bit of effort to add generic support to the
// asset and tradeCurrency classes and to handle it correctly from their many client classes.
// So we decided to hack in the sub-assets as copies of the price and accept the annoyance to see
// 3 different prices for the same master asset. But who knows, maybe prices will differ over time for
// the sub assets so then we are better prepared that way...
if (currencyCode.equals("USDT")) {
addPrice(marketPriceMap, "USDT-O", price, timestampSec);
addPrice(marketPriceMap, "USDT-E", price, timestampSec);
addPrice(marketPriceMap, "L-USDT", price, timestampSec);
} else {
// NON_EXISTING_SYMBOL is returned from service for nto found items
// Sometimes it has post fixes as well so we use a 'contains' check.
if (!currencyCode.contains("NON_EXISTING_SYMBOL")) {
addPrice(marketPriceMap, currencyCode, price, timestampSec);
}
}
marketPriceMap.put(currencyCode, new MarketPrice(currencyCode, price, timestampSec, true));
} catch (Throwable t) {
log.error(t.toString());
t.printStackTrace();
Expand All @@ -97,13 +80,6 @@ public Tuple2<Map<String, Long>, Map<String, MarketPrice>> getAll() throws IOExc
return new Tuple2<>(tsMap, marketPriceMap);
}

private void addPrice(Map<String, MarketPrice> marketPriceMap,
String currencyCode,
double price,
long timestampSec) {
marketPriceMap.put(currencyCode, new MarketPrice(currencyCode, price, timestampSec, true));
}

public String getBaseUrl() {
return httpClient.getBaseUrl();
}
Expand Down

0 comments on commit ce27948

Please sign in to comment.