mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Revert Tether USD for now due to various issues
This commit is contained in:
parent
9ab53eb099
commit
de48b3b040
@ -1,12 +0,0 @@
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.LiquidBitcoinAddressValidator;
|
||||
|
||||
public class TetherUSDLiquid extends Coin {
|
||||
public TetherUSDLiquid() {
|
||||
// If you add a new USDT variant or want to change this ticker symbol you should also look here:
|
||||
// core/src/main/java/bisq/core/provider/price/PriceProvider.java:getAll()
|
||||
super("Tether USD (Liquid)", "L-USDT", new LiquidBitcoinAddressValidator());
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
|
||||
public class TetherUSDOmni extends Coin {
|
||||
public TetherUSDOmni() {
|
||||
// If you add a new USDT variant or want to change this ticker symbol you should also look here:
|
||||
// core/src/main/java/bisq/core/provider/price/PriceProvider.java:getAll()
|
||||
super("Tether USD (Omni)", "USDT-O", new Base58BitcoinAddressValidator());
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package bisq.asset.tokens;
|
||||
|
||||
import bisq.asset.Erc20Token;
|
||||
|
||||
public class TetherUSDERC20 extends Erc20Token {
|
||||
public TetherUSDERC20() {
|
||||
// If you add a new USDT variant or want to change this ticker symbol you should also look here:
|
||||
// core/src/main/java/bisq/core/provider/price/PriceProvider.java:getAll()
|
||||
super("Tether USD (ERC20)", "USDT-E");
|
||||
}
|
||||
}
|
@ -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
|
||||
@ -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
|
||||
|
@ -70,24 +70,7 @@ public class PriceProvider extends HttpClientProvider {
|
||||
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();
|
||||
@ -97,13 +80,6 @@ public class PriceProvider extends HttpClientProvider {
|
||||
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user