Remove resources and references to ARTIS Sigma/Tau networks (#3236)

pull/2832/merge
justindg 1 year ago committed by GitHub
parent 96c472a9c1
commit 88ca2f7dcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 5
      app/src/main/java/com/alphawallet/app/C.java
  3. 22
      app/src/main/java/com/alphawallet/app/repository/EthereumNetworkBase.java
  4. 23
      app/src/main/java/com/alphawallet/app/service/GasService.java
  5. 27
      app/src/main/java/com/alphawallet/app/service/TickerService.java
  6. 3
      app/src/main/java/com/alphawallet/app/service/TransactionsNetworkClient.java
  7. 12
      app/src/main/res/drawable/ic_artis_sigma_logo.xml
  8. 12
      app/src/main/res/drawable/ic_artis_tau_logo.xml
  9. 2
      app/src/main/res/values/colors_misc.xml
  10. 6
      dmz/src/main/java/com/alphawallet/token/web/Service/EthRPCNodes.java
  11. 2
      fastlane/metadata/android/en-US/full_description.txt
  12. 8
      lib/src/main/java/com/alphawallet/ethereum/EthereumNetworkBase.java
  13. 18
      lib/src/main/java/com/alphawallet/token/entity/MagicLinkInfo.java

@ -21,7 +21,7 @@ AlphaWallet and TokenScript have been used by tokenisation projects like FIFA an
## About AlphaWallet - Features
Easy to use and secure open source Ethereum wallet for Android and iOS, with native ERC20, ERC721, ERC1155 and ERC875 support. AlphaWallet supports all Ethereum based networks: Ethereum, xDai, Ethereum Classic, Artis, Binance Smart Chain, Heco, Polygon, Avalanche, Fantom, L2 chains Optimistic and Arbitrum, and Palm.
Easy to use and secure open source Ethereum wallet for Android and iOS, with native ERC20, ERC721, ERC1155 and ERC875 support. AlphaWallet supports all Ethereum based networks: Ethereum, xDai, Ethereum Classic, Binance Smart Chain, Heco, Polygon, Avalanche, Fantom, L2 chains Optimistic and Arbitrum, and Palm.
TestChains: Goerli, Binance Test, Heco Test, Fuji (Avalanche test), Fantom Test, Polygon Test, Optimistic and Arbitrum Test, Cronos Test and Palm test.
- Beginner Friendly

@ -24,8 +24,6 @@ public abstract class C {
public static final String CLASSIC_NETWORK_NAME = "Ethereum Classic";
public static final String XDAI_NETWORK_NAME = "Gnosis";
public static final String GOERLI_NETWORK_NAME = "Görli (Test)";
public static final String ARTIS_SIGMA1_NETWORK = "ARTIS sigma1";
public static final String ARTIS_TAU1_NETWORK = "ARTIS tau1 (Test)";
public static final String BINANCE_TEST_NETWORK = "BSC TestNet";
public static final String BINANCE_MAIN_NETWORK = "Binance (BSC)";
public static final String HECO_MAIN_NETWORK = "Heco";
@ -58,7 +56,6 @@ public abstract class C {
public static final String ETHEREUM_TICKER_NAME = "ethereum";
public static final String CLASSIC_TICKER_NAME = "ethereum-classic";
public static final String XDAI_TICKER_NAME = "dai";
public static final String ARTIS_SIGMA_TICKER = "artis";
public static final String BINANCE_TICKER = "binance";
public static final String ETHEREUM_TICKER = "ethereum";
@ -68,8 +65,6 @@ public abstract class C {
public static final String xDAI_SYMBOL = "xDai";
public static final String ETC_SYMBOL = "ETC";
public static final String GOERLI_SYMBOL = "GÖETH";
public static final String ARTIS_SIGMA1_SYMBOL = "ATS";
public static final String ARTIS_TAU1_SYMBOL = "ATS";
public static final String BINANCE_SYMBOL = "BNB";
public static final String HECO_SYMBOL = "HT";
public static final String FANTOM_SYMBOL = "FTM";

@ -10,8 +10,6 @@ import static com.alphawallet.app.util.Utils.isValidUrl;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARBITRUM_GOERLI_TESTNET_FALLBACK_RPC_URL;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARBITRUM_GOERLI_TEST_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARBITRUM_MAIN_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARTIS_SIGMA1_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARTIS_TAU1_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.AURORA_MAINNET_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.AURORA_MAINNET_RPC_URL;
import static com.alphawallet.ethereum.EthereumNetworkBase.AURORA_TESTNET_ID;
@ -157,8 +155,6 @@ public abstract class EthereumNetworkBase implements EthereumNetworkRepositoryTy
//See the declaration of NetworkInfo - it has a member backupNodeUrl. Put your secondary node here.
public static final String CLASSIC_RPC_URL = "https://www.ethercluster.com/etc";
public static final String ARTIS_SIGMA1_RPC_URL = "https://rpc.sigma1.artis.network";
public static final String ARTIS_TAU1_RPC_URL = "https://rpc.tau1.artis.network";
public static final String BINANCE_TEST_RPC_URL = "https://data-seed-prebsc-1-s3.binance.org:8545";
public static final String BINANCE_TEST_FALLBACK_RPC_URL = "https://data-seed-prebsc-2-s1.binance.org:8545";
public static final String BINANCE_MAIN_RPC_URL = "https://bsc-dataseed.binance.org";
@ -177,12 +173,12 @@ public abstract class EthereumNetworkBase implements EthereumNetworkRepositoryTy
//If your wallet prioritises xDai for example, you may want to move the XDAI_ID to the front of this list,
//Then xDai would appear as the first token at the top of the wallet
private static final List<Long> hasValue = new ArrayList<>(Arrays.asList(
MAINNET_ID, GNOSIS_ID, POLYGON_ID, CLASSIC_ID, ARTIS_SIGMA1_ID, BINANCE_MAIN_ID, HECO_ID, AVALANCHE_ID,
MAINNET_ID, GNOSIS_ID, POLYGON_ID, CLASSIC_ID, BINANCE_MAIN_ID, HECO_ID, AVALANCHE_ID,
FANTOM_ID, OPTIMISTIC_MAIN_ID, CRONOS_MAIN_ID, ARBITRUM_MAIN_ID, PALM_ID, KLAYTN_ID, IOTEX_MAINNET_ID, AURORA_MAINNET_ID, MILKOMEDA_C1_ID, OKX_ID));
private static final List<Long> testnetList = new ArrayList<>(Arrays.asList(
GOERLI_ID, BINANCE_TEST_ID, HECO_TEST_ID, CRONOS_TEST_ID, OPTIMISM_GOERLI_TEST_ID, ARBITRUM_GOERLI_TEST_ID, KLAYTN_BAOBAB_ID,
FANTOM_TEST_ID, IOTEX_TESTNET_ID, FUJI_TEST_ID, POLYGON_TEST_ID, MILKOMEDA_C1_TEST_ID, ARTIS_TAU1_ID,
FANTOM_TEST_ID, IOTEX_TESTNET_ID, FUJI_TEST_ID, POLYGON_TEST_ID, MILKOMEDA_C1_TEST_ID,
SEPOLIA_TESTNET_ID, AURORA_TESTNET_ID, PALM_TEST_ID));
private static final List<Long> deprecatedNetworkList = new ArrayList<>(Arrays.asList(
@ -233,18 +229,10 @@ public abstract class EthereumNetworkBase implements EthereumNetworkRepositoryTy
XDAI_RPC_URL,
"https://blockscout.com/xdai/mainnet/tx/", GNOSIS_ID,
"https://rpc.ankr.com/gnosis", "https://blockscout.com/xdai/mainnet/api?"));
put(ARTIS_SIGMA1_ID, new NetworkInfo(C.ARTIS_SIGMA1_NETWORK, C.ARTIS_SIGMA1_SYMBOL,
ARTIS_SIGMA1_RPC_URL,
"https://explorer.sigma1.artis.network/tx/", ARTIS_SIGMA1_ID,
ARTIS_SIGMA1_RPC_URL, "https://explorer.sigma1.artis.network/api?"));
put(GOERLI_ID, new NetworkInfo(C.GOERLI_NETWORK_NAME, C.GOERLI_SYMBOL,
GOERLI_RPC_URL,
"https://goerli.etherscan.io/tx/", GOERLI_ID,
GOERLI_FALLBACK_RPC_URL, "https://api-goerli.etherscan.io/api?"));
put(ARTIS_TAU1_ID, new NetworkInfo(C.ARTIS_TAU1_NETWORK, C.ARTIS_TAU1_SYMBOL,
ARTIS_TAU1_RPC_URL,
"https://explorer.tau1.artis.network/tx/", ARTIS_TAU1_ID,
ARTIS_TAU1_RPC_URL, "https://explorer.tau1.artis.network/api?"));
put(BINANCE_TEST_ID, new NetworkInfo(C.BINANCE_TEST_NETWORK, C.BINANCE_SYMBOL,
BINANCE_TEST_RPC_URL,
"https://testnet.bscscan.com/tx/", BINANCE_TEST_ID,
@ -370,8 +358,6 @@ public abstract class EthereumNetworkBase implements EthereumNetworkRepositoryTy
put(CLASSIC_ID, R.drawable.ic_icons_network_etc); //classic_logo
put(GNOSIS_ID, R.drawable.ic_icons_network_gnosis);
put(GOERLI_ID, R.drawable.ic_goerli);
put(ARTIS_SIGMA1_ID, R.drawable.ic_artis_sigma_logo);
put(ARTIS_TAU1_ID, R.drawable.ic_artis_tau_logo);
put(BINANCE_MAIN_ID, R.drawable.ic_binance_logo);
put(BINANCE_TEST_ID, R.drawable.ic_icons_tokens_bnb_testnet);
put(HECO_ID, R.drawable.ic_heco_logo);
@ -410,8 +396,6 @@ public abstract class EthereumNetworkBase implements EthereumNetworkRepositoryTy
put(CLASSIC_ID, R.drawable.ic_icons_network_etc);
put(GNOSIS_ID, R.drawable.ic_icons_network_gnosis);
put(GOERLI_ID, R.drawable.ic_goerli);
put(ARTIS_SIGMA1_ID, R.drawable.ic_icons_network_artis);
put(ARTIS_TAU1_ID, R.drawable.ic_artis_tau_logo);
put(BINANCE_MAIN_ID, R.drawable.ic_icons_network_bsc);
put(BINANCE_TEST_ID, R.drawable.ic_icons_tokens_bnb_testnet);
put(HECO_ID, R.drawable.ic_icons_network_heco);
@ -450,8 +434,6 @@ public abstract class EthereumNetworkBase implements EthereumNetworkRepositoryTy
put(CLASSIC_ID, R.color.classic);
put(GNOSIS_ID, R.color.xdai);
put(GOERLI_ID, R.color.goerli);
put(ARTIS_SIGMA1_ID, R.color.artis_sigma1);
put(ARTIS_TAU1_ID, R.color.artis_tau1);
put(BINANCE_MAIN_ID, R.color.binance_main);
put(BINANCE_TEST_ID, R.color.binance_test);
put(HECO_ID, R.color.heco_main);

@ -7,7 +7,6 @@ import static com.alphawallet.app.C.GAS_LIMIT_MIN;
import static com.alphawallet.app.entity.tokenscript.TokenscriptFunction.ZERO_ADDRESS;
import static com.alphawallet.app.repository.TokenRepository.getWeb3jService;
import static com.alphawallet.app.repository.TokensRealmSource.TICKER_DB;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARTIS_TAU1_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.MAINNET_ID;
import android.text.TextUtils;
@ -224,31 +223,11 @@ public class GasService implements ContractGasProvider
private Boolean updateGasPrice(EthGasPrice ethGasPrice, long chainId)
{
currentGasPrice = fixGasPrice(ethGasPrice.getGasPrice(), chainId);
currentGasPrice = ethGasPrice.getGasPrice();
updateRealm(new GasPriceSpread(currentGasPrice, networkRepository.hasLockedGas(chainId)), chainId);
return true;
}
private BigInteger fixGasPrice(BigInteger gasPrice, long chainId)
{
if (gasPrice.compareTo(BigInteger.ZERO) > 0)
{
return gasPrice;
}
else
{
//gas price from node is zero
switch ((int)chainId)
{
default:
return gasPrice;
case (int)ARTIS_TAU1_ID:
//this node incorrectly returns gas price zero, use 1 Gwei
return new BigInteger(C.DEFAULT_XDAI_GAS_PRICE);
}
}
}
private Single<Boolean> updateEtherscanGasPrices(String gasOracleAPI)
{
final long chainId = currentChainId;

@ -2,7 +2,6 @@ package com.alphawallet.app.service;
import static com.alphawallet.app.entity.tokenscript.TokenscriptFunction.ZERO_ADDRESS;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARBITRUM_MAIN_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARTIS_SIGMA1_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.AURORA_MAINNET_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.AVALANCHE_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.BINANCE_MAIN_ID;
@ -142,7 +141,6 @@ public class TickerService
mainTickerUpdate = updateCurrencyConversion()
.flatMap(this::updateTickersFromOracle)
.flatMap(this::fetchTickersSeparatelyIfRequired)
.flatMap(this::addArtisTicker)
.map(this::checkTickers)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -493,20 +491,6 @@ public class TickerService
return ethTickers.get(chainId);
}
private Single<Integer> addArtisTicker(int tickerCount)
{
return convertPair("EUR", currentCurrencySymbolTxt)
.flatMap(this::getSigmaTicker)
.map(this::addArtisTickers)
.map(ticker -> (tickerCount + 2));
}
private TokenTicker addArtisTickers(TokenTicker tokenTicker)
{
ethTickers.put(ARTIS_SIGMA1_ID, tokenTicker);
return tokenTicker;
}
private TokenTicker decodeCoinGeckoTicker(JSONObject eth)
{
TokenTicker tTicker;
@ -646,17 +630,6 @@ public class TickerService
}
}
private Single<TokenTicker> getSigmaTicker(double rate)
{
return Single.fromCallable(() -> {
String percentageChange = "0.00";
double conversion = (1.0 / 13.7603) * rate; //13.7603 ATS = 1 EUR
String price_usd = String.valueOf(conversion);
String image = "https://artis.eco/i/favicon.png";
return new TokenTicker(price_usd, percentageChange, currentCurrencySymbolTxt, image, System.currentTimeMillis());
});
}
private void onTickersError(Throwable throwable)
{
mainTickerUpdate = null;

@ -2,7 +2,6 @@ package com.alphawallet.app.service;
import static com.alphawallet.app.repository.EthereumNetworkBase.COVALENT;
import static com.alphawallet.app.repository.TokensRealmSource.databaseKey;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARTIS_TAU1_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.AURORA_MAINNET_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.AURORA_TESTNET_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.BINANCE_MAIN_ID;
@ -714,7 +713,7 @@ public class TransactionsNetworkClient implements TransactionsNetworkClientType
}
catch (Exception e)
{
if (networkInfo.chainId != ARTIS_TAU1_ID && BuildConfig.DEBUG) Timber.e(e);
if (BuildConfig.DEBUG) Timber.e(e);
}
return result;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -17,8 +17,6 @@
<color name="xdai">#48A9A6</color>
<color name="classic">#378937</color>
<color name="goerli">#BBAE9A</color>
<color name="artis_sigma1">#53A271</color>
<color name="artis_tau1">#F97599</color>
<color name="binance_test">#ffca2f</color>
<color name="binance_main">#f3ba2f</color>
<color name="heco_test">#5F9FFF</color>

@ -10,8 +10,6 @@ public class EthRPCNodes
private static final String CLASSIC_RPC_URL = "https://www.ethercluster.com/etc";
private static final String XDAI_RPC_URL = EthereumNetworkBase.XDAI_RPC_URL;
private static final String GOERLI_RPC_URL = "https://goerli.infura.io/v3/" + getInfuraKey();
private static final String ARTIS_SIGMA1_RPC_URL = "https://rpc.sigma1.artis.network";
private static final String ARTIS_TAU1_RPC_URL = "https://rpc.tau1.artis.network";
public static String getNodeURLByNetworkId(long networkId) {
@ -24,10 +22,6 @@ public class EthRPCNodes
return XDAI_RPC_URL;
case (int)EthereumNetworkBase.GOERLI_ID:
return GOERLI_RPC_URL;
case (int)EthereumNetworkBase.ARTIS_SIGMA1_ID:
return ARTIS_SIGMA1_RPC_URL;
case (int)EthereumNetworkBase.ARTIS_TAU1_ID:
return ARTIS_TAU1_RPC_URL;
default:
return MAINNET_RPC_URL;
}

@ -1,4 +1,4 @@
AlphaWallet is an easy to use and secure Ethereum wallet with native ERC20, ERC721 and ERC875 support. AlphaWallet supports all Ethereum based networks, Ethereum, xDai, Ethereum Classic, Artis, and Goerli.
AlphaWallet is an easy to use and secure Ethereum wallet with native ERC20, ERC721 and ERC875 support. AlphaWallet supports all Ethereum based networks, Ethereum, xDai, Ethereum Classic, and Goerli.
Focus on Defi:
- Shows comprehensive breakdown on Token transactions & swaps.

@ -13,8 +13,6 @@ public abstract class EthereumNetworkBase
public static final long CLASSIC_ID = 61;
public static final long GNOSIS_ID = 100;
public static final long GOERLI_ID = 5;
public static final long ARTIS_SIGMA1_ID = 246529;
public static final long ARTIS_TAU1_ID = 246785;
public static final long BINANCE_TEST_ID = 97;
public static final long BINANCE_MAIN_ID = 56;
public static final long HECO_ID = 128;
@ -49,8 +47,6 @@ public abstract class EthereumNetworkBase
public static final String CLASSIC_RPC_URL = "https://www.ethercluster.com/etc";
public static final String XDAI_RPC_URL = "https://rpc.gnosischain.com";
public static final String GOERLI_RPC_URL = "https://goerli.infura.io/v3/da3717f25f824cc1baa32d812386d93f";
public static final String ARTIS_SIGMA1_RPC_URL = "https://rpc.sigma1.artis.network";
public static final String ARTIS_TAU1_RPC_URL = "https://rpc.tau1.artis.network";
public static final String BINANCE_TEST_RPC_URL = "https://data-seed-prebsc-1-s3.binance.org:8545";
public static final String BINANCE_MAIN_RPC_URL = "https://bsc-dataseed.binance.org";
public static final String HECO_RPC_URL = "https://http-mainnet.hecochain.com";
@ -89,12 +85,8 @@ public abstract class EthereumNetworkBase
CLASSIC_ID, false));
put(GNOSIS_ID, new NetworkInfo("Gnosis", "xDAi", XDAI_RPC_URL, "https://blockscout.com/xdai/mainnet/tx/",
GNOSIS_ID, false));
put(ARTIS_SIGMA1_ID, new NetworkInfo("ARTIS sigma1", "ATS", ARTIS_SIGMA1_RPC_URL, "https://explorer.sigma1.artis.network/tx/",
ARTIS_SIGMA1_ID, false));
put(GOERLI_ID, new NetworkInfo("Görli (Test)", "GÖETH", GOERLI_RPC_URL, "https://goerli.etherscan.io/tx/",
GOERLI_ID, false));
put(ARTIS_TAU1_ID, new NetworkInfo("ARTIS tau1 (Test)", "ATS", ARTIS_TAU1_RPC_URL, "https://explorer.tau1.artis.network/tx/",
ARTIS_TAU1_ID, false));
put(BINANCE_TEST_ID, new NetworkInfo("BSC TestNet (Test)", "T-BSC", BINANCE_TEST_RPC_URL, "https://explorer.binance.org/smart-testnet/tx/",
BINANCE_TEST_ID, false));
put(BINANCE_MAIN_ID, new NetworkInfo("Binance (BSC)", "BSC", BINANCE_MAIN_RPC_URL, "https://explorer.binance.org/smart/tx/",

@ -3,8 +3,6 @@ package com.alphawallet.token.entity;
import com.alphawallet.ethereum.EthereumNetworkBase;
import com.alphawallet.ethereum.NetworkInfo;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARTIS_SIGMA1_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.ARTIS_TAU1_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.CLASSIC_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.GOERLI_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.MAINNET_ID;
@ -23,8 +21,6 @@ public class MagicLinkInfo
private static final String callistoMagicLinkDomain = "callisto.aw.app";
private static final String xDaiMagicLinkDomain = "xdai.aw.app";
private static final String goerliMagicLinkDomain = "goerli.aw.app";
private static final String artisSigma1MagicLinkDomain = "artissigma1.aw.app";
private static final String artisTau1MagicLinkDomain = "artistau1.aw.app";
private static final String customMagicLinkDomain = "custom.aw.app";
//Etherscan domains
@ -33,8 +29,6 @@ public class MagicLinkInfo
private static final String callistoEtherscan = "https://etherscan.io/"; //TODO: determine callisto etherscan
private static final String xDaiEtherscan = "https://blockscout.com/poa/dai/";
private static final String goerliEtherscan = "https://goerli.etherscan.io/";
private static final String artisSigma1Etherscan = "https://explorer.sigma1.artis.network/";
private static final String artisTau1Etherscan = "https://explorer.tau1.artis.network/";
public static String getNetworkNameById(long networkId) {
NetworkInfo info = EthereumNetworkBase.getNetworkByChain(networkId);
@ -61,10 +55,6 @@ public class MagicLinkInfo
return xDaiMagicLinkDomain;
case (int)GOERLI_ID:
return goerliMagicLinkDomain;
case (int)ARTIS_SIGMA1_ID:
return artisSigma1MagicLinkDomain;
case (int)ARTIS_TAU1_ID:
return artisTau1MagicLinkDomain;
}
}
@ -83,10 +73,6 @@ public class MagicLinkInfo
return GNOSIS_ID;
case goerliMagicLinkDomain:
return GOERLI_ID;
case artisSigma1MagicLinkDomain:
return ARTIS_SIGMA1_ID;
case artisTau1MagicLinkDomain:
return ARTIS_TAU1_ID;
}
}
@ -102,10 +88,6 @@ public class MagicLinkInfo
return xDaiEtherscan;
case (int)GOERLI_ID:
return goerliEtherscan;
case (int)ARTIS_SIGMA1_ID:
return artisSigma1Etherscan;
case (int)ARTIS_TAU1_ID:
return artisTau1Etherscan;
}
}

Loading…
Cancel
Save