Remove Telegram support

pull/3374/head
James Brown 7 months ago
parent 921e7c8a90
commit 0c5c52db53
  1. 4
      README.md
  2. 1
      app/src/main/java/com/alphawallet/app/C.java
  3. 1
      app/src/main/java/com/alphawallet/app/analytics/Analytics.java
  4. 1
      app/src/main/java/com/alphawallet/app/entity/MediaLinks.java
  5. 33
      app/src/main/java/com/alphawallet/app/ui/SupportSettingsActivity.java
  6. 3
      app/src/main/res/values-es/strings.xml
  7. 3
      app/src/main/res/values-fr/strings.xml
  8. 3
      app/src/main/res/values-id/strings.xml
  9. 3
      app/src/main/res/values-my/strings.xml
  10. 3
      app/src/main/res/values-vi/strings.xml
  11. 3
      app/src/main/res/values-zh/strings.xml
  12. 3
      app/src/main/res/values/strings.xml
  13. 9
      app/src/test/java/com/alphawallet/app/web3/Web3ViewClientTest.java
  14. 2
      fastlane/metadata/android/en-US/full_description.txt

@ -120,7 +120,7 @@ If you are forking AlphaWallet and you have a cool Token, please consider donati
### Request or submit a feature :postbox: ### Request or submit a feature :postbox:
Would you like to request a feature? Please get in touch with us [Telegram](https://t.me/AlphaWalletGroup), [Discord](https://discord.gg/mx23YWRTYf), [Twitter](https://twitter.com/AlphaWallet) or through our [community forums](https://community.tokenscript.org/). Would you like to request a feature? Please get in touch with us [Discord](https://discord.gg/mx23YWRTYf), [Twitter](https://twitter.com/AlphaWallet) or through our [community forums](https://community.tokenscript.org/).
If you’d like to contribute code with a Pull Request, please make sure to follow code submission guidelines. If you’d like to contribute code with a Pull Request, please make sure to follow code submission guidelines.
@ -130,14 +130,12 @@ We want to connect businesses and consumers with the new digital economic infras
<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=https://github.com/AlphaWallet/alpha-wallet-android"><img src=dmz/src/main/resources/static/readme/share_linkedin-btn.svg height="35" alt="share on linkedin"></a> <a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=https://github.com/AlphaWallet/alpha-wallet-android"><img src=dmz/src/main/resources/static/readme/share_linkedin-btn.svg height="35" alt="share on linkedin"></a>
<a href="https://twitter.com/share?url=https://github.com/AlphaWallet/alpha-wallet-android&amp;text=Open%20Source%20Wallet%20for%20Android&amp;hashtags=alphawallet"><img src=dmz/src/main/resources/static/readme/share_tweet-btn.svg height="35" alt="share on twitter"></a> <a href="https://twitter.com/share?url=https://github.com/AlphaWallet/alpha-wallet-android&amp;text=Open%20Source%20Wallet%20for%20Android&amp;hashtags=alphawallet"><img src=dmz/src/main/resources/static/readme/share_tweet-btn.svg height="35" alt="share on twitter"></a>
<a href="https://t.me/share/url?url=https://github.com/AlphaWallet/alpha-wallet-android&text=Check%20this%20out!"><img src=dmz/src/main/resources/static/readme/share_telegram-btn.svg height="35" alt="share on telegram"></a>
<a href="mailto:?Subject=open source alphawallet for android&amp;Body=Found%20this%20one,%20check%20it%20out!%20 https://github.com/AlphaWallet/alpha-wallet-android"><img src=dmz/src/main/resources/static/readme/share_mail-btn.svg height="35" alt="send via email"></a> <a href="mailto:?Subject=open source alphawallet for android&amp;Body=Found%20this%20one,%20check%20it%20out!%20 https://github.com/AlphaWallet/alpha-wallet-android"><img src=dmz/src/main/resources/static/readme/share_mail-btn.svg height="35" alt="send via email"></a>
<a href="http://reddit.com/submit?url=https://github.com/AlphaWallet/alpha-wallet-android&amp;title=Open%20Source%20AlphaWallet%20for%20Android"><img src=dmz/src/main/resources/static/readme/share_reddit-btn.svg height="35" alt="share on reddit"></a> <a href="http://reddit.com/submit?url=https://github.com/AlphaWallet/alpha-wallet-android&amp;title=Open%20Source%20AlphaWallet%20for%20Android"><img src=dmz/src/main/resources/static/readme/share_reddit-btn.svg height="35" alt="share on reddit"></a>
<a href="http://www.facebook.com/sharer.php?u=https://github.com/AlphaWallet/alpha-wallet-android"><img src=dmz/src/main/resources/static/readme/share_facebook-btn.svg height="35" alt="share on facebook"></a> <a href="http://www.facebook.com/sharer.php?u=https://github.com/AlphaWallet/alpha-wallet-android"><img src=dmz/src/main/resources/static/readme/share_facebook-btn.svg height="35" alt="share on facebook"></a>
To learn more about us, please check our Blog or join the conversation: To learn more about us, please check our Blog or join the conversation:
- [Blog](https://medium.com/alphawallet) - [Blog](https://medium.com/alphawallet)
- [Telegram](https://t.me/AlphaWalletGroup)
- [Twitter](https://twitter.com/AlphaWallet) - [Twitter](https://twitter.com/AlphaWallet)
- [Facebook](https://www.facebook.com/AlphaWallet) - [Facebook](https://www.facebook.com/AlphaWallet)
- [LinkedIn](https://www.linkedin.com/company/alphawallet/) - [LinkedIn](https://www.linkedin.com/company/alphawallet/)

@ -234,7 +234,6 @@ public abstract class C {
public static final String DEFAULT_NETWORK = ETHEREUM_NETWORK_NAME; public static final String DEFAULT_NETWORK = ETHEREUM_NETWORK_NAME;
public static final String TELEGRAM_PACKAGE_NAME = "org.telegram.messenger";
public static final String TWITTER_PACKAGE_NAME = "com.twitter.android"; public static final String TWITTER_PACKAGE_NAME = "com.twitter.android";
public static final String FACEBOOK_PACKAGE_NAME = "com.facebook.katana"; public static final String FACEBOOK_PACKAGE_NAME = "com.facebook.katana";
public static final String LINKEDIN_PACKAGE_NAME = "com.linkedin.android"; public static final String LINKEDIN_PACKAGE_NAME = "com.linkedin.android";

@ -135,7 +135,6 @@ public class Analytics
DAPP_ADDED("Dapp Added"), DAPP_ADDED("Dapp Added"),
DAPP_EDITED("Dapp Edited"), DAPP_EDITED("Dapp Edited"),
RELOAD_BROWSER("Reload Browser"), RELOAD_BROWSER("Reload Browser"),
SUPPORT_TELEGRAM("Clicked Telegram Customer Support Link"),
SUPPORT_DISCORD("Clicked Discord Link"), SUPPORT_DISCORD("Clicked Discord Link"),
SUPPORT_EMAIL("Clicked Email Link"), SUPPORT_EMAIL("Clicked Email Link"),
SUPPORT_TWITTER("Clicked Twitter Link"), SUPPORT_TWITTER("Clicked Twitter Link"),

@ -8,7 +8,6 @@ public class MediaLinks
// Update these media platform links and ids to target your media groups, // Update these media platform links and ids to target your media groups,
// then update the MEDIA_TARGET_APPLICATION to match your applicationId // then update the MEDIA_TARGET_APPLICATION to match your applicationId
public static final String MEDIA_TARGET_APPLICATION = "io.stormbird.wallet"; public static final String MEDIA_TARGET_APPLICATION = "io.stormbird.wallet";
public static final String AWALLET_TELEGRAM_URL = "https://t.me/AlphaWalletSupport";
public static final String AWALLET_DISCORD_URL = "https://discord.gg/mx23YWRTYf"; public static final String AWALLET_DISCORD_URL = "https://discord.gg/mx23YWRTYf";
public static final String AWALLET_TWITTER_ID = "twitter://user?user_id=938624096123764736"; public static final String AWALLET_TWITTER_ID = "twitter://user?user_id=938624096123764736";
public static final String AWALLET_FACEBOOK_ID = "fb://page/1958651857482632"; public static final String AWALLET_FACEBOOK_ID = "fb://page/1958651857482632";

@ -24,7 +24,6 @@ public class SupportSettingsActivity extends BaseActivity
{ {
private SupportSettingsViewModel viewModel; private SupportSettingsViewModel viewModel;
private LinearLayout supportSettingsLayout; private LinearLayout supportSettingsLayout;
private SettingsItemView telegram;
private SettingsItemView discord; private SettingsItemView discord;
private SettingsItemView email; private SettingsItemView email;
private SettingsItemView twitter; private SettingsItemView twitter;
@ -65,12 +64,6 @@ public class SupportSettingsActivity extends BaseActivity
private void initializeSettings() private void initializeSettings()
{ {
telegram = new SettingsItemView.Builder(this)
.withIcon(R.drawable.ic_logo_telegram)
.withTitle(R.string.telegram)
.withListener(this::onTelegramClicked)
.build();
discord = new SettingsItemView.Builder(this) discord = new SettingsItemView.Builder(this)
.withIcon(R.drawable.ic_logo_discord) .withIcon(R.drawable.ic_logo_discord)
.withTitle(R.string.discord) .withTitle(R.string.discord)
@ -123,10 +116,6 @@ public class SupportSettingsActivity extends BaseActivity
private void addSettingsToLayout() private void addSettingsToLayout()
{ {
supportSettingsLayout = findViewById(R.id.layout); supportSettingsLayout = findViewById(R.id.layout);
if (MediaLinks.AWALLET_TELEGRAM_URL != null)
{
supportSettingsLayout.addView(telegram);
}
if (MediaLinks.AWALLET_DISCORD_URL != null) if (MediaLinks.AWALLET_DISCORD_URL != null)
{ {
@ -162,28 +151,6 @@ public class SupportSettingsActivity extends BaseActivity
supportSettingsLayout.addView(faq); supportSettingsLayout.addView(faq);
} }
private void onTelegramClicked()
{
if (MediaLinks.isMediaTargeted(getApplicationContext()))
{
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(MediaLinks.AWALLET_TELEGRAM_URL));
if (isAppAvailable(C.TELEGRAM_PACKAGE_NAME))
{
intent.setPackage(C.TELEGRAM_PACKAGE_NAME);
}
try
{
viewModel.track(Analytics.Action.SUPPORT_TELEGRAM);
startActivity(intent);
}
catch (Exception e)
{
Timber.e(e);
}
}
}
private void onGitHubClicked() private void onGitHubClicked()
{ {
try try

@ -375,7 +375,6 @@
<string name="is_address">Acabas de escanear una dirección de Ethereum. ¿Quieres probar a cargarla como un token?</string> <string name="is_address">Acabas de escanear una dirección de Ethereum. ¿Quieres probar a cargarla como un token?</string>
<string name="dialog_load_as_contract">Cargar token</string> <string name="dialog_load_as_contract">Cargar token</string>
<string name="blockchain">Cadena de bloques de %1$s</string> <string name="blockchain">Cadena de bloques de %1$s</string>
<string name="telegram">Telegrama (Atención al Cliente)</string>
<string name="transfer_request">Solicitud de transferencia</string> <string name="transfer_request">Solicitud de transferencia</string>
<string name="token_transfer_request">Solicitud de transferencia de tokens: %1$s</string> <string name="token_transfer_request">Solicitud de transferencia de tokens: %1$s</string>
<string name="generate_payment_request">Generar solicitud de pago</string> <string name="generate_payment_request">Generar solicitud de pago</string>
@ -716,7 +715,7 @@
<string name="disconnect">Disconnect</string> <string name="disconnect">Disconnect</string>
<string name="keep_connect">Keep Connected</string> <string name="keep_connect">Keep Connected</string>
<string name="beware_of_scammers">Beware of scammers!\nDon\'t share seed phrase.</string> <string name="beware_of_scammers">Beware of scammers!\nDon\'t share seed phrase.</string>
<string name="alphawallet_never_ask">AlphaWallet will NEVER ask about your seed phrase (especially on Telegram).</string> <string name="alphawallet_never_ask">AlphaWallet NUNCA le preguntará sobre su frase inicial (y solo respondemos a los mensajes directos, nunca a los mensajes directos primero).</string>
<string name="your_seed_phrase">Your seed phrase (do not share with anyone)</string> <string name="your_seed_phrase">Your seed phrase (do not share with anyone)</string>
<string name="hide_seed_text">OK, Hide Seed Phrase</string> <string name="hide_seed_text">OK, Hide Seed Phrase</string>
<string name="ens_not_match_wallet">ENS Name does not match wallet address</string> <string name="ens_not_match_wallet">ENS Name does not match wallet address</string>

@ -385,7 +385,6 @@
<string name="is_address">Vous venez de scanner une adresse Ethereum. Voulez-vous essayer de la charger en tant que token?</string> <string name="is_address">Vous venez de scanner une adresse Ethereum. Voulez-vous essayer de la charger en tant que token?</string>
<string name="dialog_load_as_contract">Chargement de token</string> <string name="dialog_load_as_contract">Chargement de token</string>
<string name="blockchain">%1$s Blockchain</string> <string name="blockchain">%1$s Blockchain</string>
<string name="telegram">Telegram (Support Client)</string>
<string name="transfer_request">Demande de transfert</string> <string name="transfer_request">Demande de transfert</string>
<string name="token_transfer_request">Demande de transfert de token: %1$s</string> <string name="token_transfer_request">Demande de transfert de token: %1$s</string>
<string name="generate_payment_request">Générer une demande de paiement</string> <string name="generate_payment_request">Générer une demande de paiement</string>
@ -729,7 +728,7 @@
<string name="disconnect">Déconnecter</string> <string name="disconnect">Déconnecter</string>
<string name="keep_connect">Rester Connecté(e)</string> <string name="keep_connect">Rester Connecté(e)</string>
<string name="beware_of_scammers"> Méfiez-vous des escrocs! \nNe partagez pas votre phrase seed.</string> <string name="beware_of_scammers"> Méfiez-vous des escrocs! \nNe partagez pas votre phrase seed.</string>
<string name="alphawallet_never_ask">AlphaWallet ne posera JAMAIS de questions sur votre phrase seed (en particulier sur Telegram).</string> <string name="alphawallet_never_ask">AlphaWallet ne vous posera JAMAIS de questions sur votre phrase de départ (et nous répondons uniquement aux DM, jamais aux DM en premier).</string>
<string name="your_seed_phrase">Votre phrase seed (ne la partager avec personne)</string> <string name="your_seed_phrase">Votre phrase seed (ne la partager avec personne)</string>
<string name="hide_seed_text">OK, Cacher votre Phrase Seed</string> <string name="hide_seed_text">OK, Cacher votre Phrase Seed</string>
<string name="ens_not_match_wallet">Le nom ENS ne correspond pas à l\'adresse du portefeuille</string> <string name="ens_not_match_wallet">Le nom ENS ne correspond pas à l\'adresse du portefeuille</string>

@ -386,7 +386,6 @@
<string name="is_address">Baru saja memindai alamat Ethereum. Apakah Anda ingin mencoba mengunggah ini sebagai Token?</string> <string name="is_address">Baru saja memindai alamat Ethereum. Apakah Anda ingin mencoba mengunggah ini sebagai Token?</string>
<string name="dialog_load_as_contract">Ungu Token</string> <string name="dialog_load_as_contract">Ungu Token</string>
<string name="blockchain">%1$s Blockchain</string> <string name="blockchain">%1$s Blockchain</string>
<string name="telegram">Telegram (Layanan Pelanggan)</string>
<string name="transfer_request">Permintaan transfer</string> <string name="transfer_request">Permintaan transfer</string>
<string name="token_transfer_request">Permintaan transfer token: %1$s</string> <string name="token_transfer_request">Permintaan transfer token: %1$s</string>
<string name="generate_payment_request">Membuat Permintaan Pembayaran</string> <string name="generate_payment_request">Membuat Permintaan Pembayaran</string>
@ -729,7 +728,7 @@
<string name="disconnect">Putuskan hubungan</string> <string name="disconnect">Putuskan hubungan</string>
<string name="keep_connect">Tetap Terhubung</string> <string name="keep_connect">Tetap Terhubung</string>
<string name="beware_of_scammers">Waspadalah terhadap penipu! Jangan membagikan Seed Phrase.</string> <string name="beware_of_scammers">Waspadalah terhadap penipu! Jangan membagikan Seed Phrase.</string>
<string name="alphawallet_never_ask">AlphaWallet TIDAK AKAN PERNAH bertanya tentang Seed Phrase Anda (terutama di Telegram).</string> <string name="alphawallet_never_ask">AlphaWallet TIDAK AKAN PERNAH bertanya tentang seed frase Anda (dan kami hanya membalas DM, tidak pernah DM terlebih dahulu).</string>
<string name="your_seed_phrase">Seed Phrase Anda (jangan bagikan dengan siapa pun)</string> <string name="your_seed_phrase">Seed Phrase Anda (jangan bagikan dengan siapa pun)</string>
<string name="hide_seed_text">OK, Sembunyikan Seed Phrase</string> <string name="hide_seed_text">OK, Sembunyikan Seed Phrase</string>
<string name="ens_not_match_wallet">Nama ENS tidak cocok dengan alamat dompet</string> <string name="ens_not_match_wallet">Nama ENS tidak cocok dengan alamat dompet</string>

@ -393,7 +393,6 @@
<string name="is_address">Ethereum လကဖတ။ တကငအဖထညရနကကမည</string> <string name="is_address">Ethereum လကဖတ။ တကငအဖထညရနကကမည</string>
<string name="dialog_load_as_contract">ကငကမည</string> <string name="dialog_load_as_contract">ကငကမည</string>
<string name="blockchain">%1$s Blockchain</string> <string name="blockchain">%1$s Blockchain</string>
<string name="telegram">Telegram</string>
<string name="transfer_request">အပအရ</string> <string name="transfer_request">အပအရ</string>
<string name="token_transfer_request">ကငအပအရ: %1$s</string> <string name="token_transfer_request">ကငအပအရ: %1$s</string>
<string name="generate_payment_request">ရနကမည</string> <string name="generate_payment_request">ရနကမည</string>
@ -743,7 +742,7 @@
<string name="disconnect">ဆကမည</string> <string name="disconnect">ဆကမည</string>
<string name="keep_connect">ဆကလကဆကမည</string> <string name="keep_connect">ဆကလကဆကမည</string>
<string name="beware_of_scammers">လညကသတ။ Seed Phraseကဝမမ</string> <string name="beware_of_scammers">လညကသတ။ Seed Phraseကဝမမ</string>
<string name="alphawallet_never_ask">AlphaWalletသညသင၏Seed Phraseအမညသညအခ(အထသဖ Telegramတ) မမပ။.</string> <string name="alphawallet_never_ask">AlphaWallet သည သင၏မအက ဘယအခမညမဟ (ကသည DMs မကသည၊ DM က အရငဘယ မမ)။</string>
<string name="your_seed_phrase">သင၏Seed Phrase(တခမဝရနသတ)</string> <string name="your_seed_phrase">သင၏Seed Phrase(တခမဝရနသတ)</string>
<string name="hide_seed_text">Seed Phraseကကမည</string> <string name="hide_seed_text">Seed Phraseကကမည</string>

@ -388,7 +388,6 @@
<string name="is_address">Just scanned an Ethereum address. Do you want to try to load this as a Token?</string> <string name="is_address">Just scanned an Ethereum address. Do you want to try to load this as a Token?</string>
<string name="dialog_load_as_contract">Nạp Token</string> <string name="dialog_load_as_contract">Nạp Token</string>
<string name="blockchain">%1$s Blockchain</string> <string name="blockchain">%1$s Blockchain</string>
<string name="telegram">Telegram (Hỗ trợ khách hàng)</string>
<string name="transfer_request">Yêu cầu chuyển</string> <string name="transfer_request">Yêu cầu chuyển</string>
<string name="token_transfer_request">Token transfer request: %1$s</string> <string name="token_transfer_request">Token transfer request: %1$s</string>
<string name="generate_payment_request">Tạo Yêu cầu Thanh toán</string> <string name="generate_payment_request">Tạo Yêu cầu Thanh toán</string>
@ -732,7 +731,7 @@
<string name="disconnect">Ngắt kết nối</string> <string name="disconnect">Ngắt kết nối</string>
<string name="keep_connect">Giữ kết nối</string> <string name="keep_connect">Giữ kết nối</string>
<string name="beware_of_scammers">Beware of scammers!\nDon\'t share seed phrase.</string> <string name="beware_of_scammers">Beware of scammers!\nDon\'t share seed phrase.</string>
<string name="alphawallet_never_ask">AlphaWallet sẽ KHÔNG BAO GIỜ hỏi về cụm từ bí mật của bạn (đặc biệt là trên Telegram).</string> <string name="alphawallet_never_ask">AlphaWallet KHÔNG BAO GIỜ hỏi về cụm từ hạt giống của bạn (và chúng tôi chỉ trả lời DM, không bao giờ DM trước).</string>
<string name="your_seed_phrase">Cụm từ bí mật của bạn (không chia sẻ với bất kỳ ai)</string> <string name="your_seed_phrase">Cụm từ bí mật của bạn (không chia sẻ với bất kỳ ai)</string>
<string name="hide_seed_text">OK, ẩn cụm từ bí mật</string> <string name="hide_seed_text">OK, ẩn cụm từ bí mật</string>
<string name="ens_not_match_wallet">Tên ENS không khớp với địa chỉ ví</string> <string name="ens_not_match_wallet">Tên ENS không khớp với địa chỉ ví</string>

@ -376,7 +376,6 @@
<string name="is_address">刚刚扫描了一个以太坊地址。您是否要尝试将此作为通证进行加载?</string> <string name="is_address">刚刚扫描了一个以太坊地址。您是否要尝试将此作为通证进行加载?</string>
<string name="dialog_load_as_contract">加载通证</string> <string name="dialog_load_as_contract">加载通证</string>
<string name="blockchain">%1$s区块链</string> <string name="blockchain">%1$s区块链</string>
<string name="telegram">电报 (客户支持)</string>
<string name="transfer_request">转账请求</string> <string name="transfer_request">转账请求</string>
<string name="token_transfer_request">通证转账请求: %1$s</string> <string name="token_transfer_request">通证转账请求: %1$s</string>
<string name="generate_payment_request">生成付款请求</string> <string name="generate_payment_request">生成付款请求</string>
@ -717,7 +716,7 @@
<string name="disconnect">Disconnect</string> <string name="disconnect">Disconnect</string>
<string name="keep_connect">Keep Connected</string> <string name="keep_connect">Keep Connected</string>
<string name="beware_of_scammers">Beware of scammers!\nDon\'t share seed phrase.</string> <string name="beware_of_scammers">Beware of scammers!\nDon\'t share seed phrase.</string>
<string name="alphawallet_never_ask">AlphaWallet will NEVER ask about your seed phrase (especially on Telegram).</string> <string name="alphawallet_never_ask">AlphaWallet 永远不会询问您的助记词(我们只回复私信,从不先私信)。</string>
<string name="your_seed_phrase">Your seed phrase (do not share with anyone)</string> <string name="your_seed_phrase">Your seed phrase (do not share with anyone)</string>
<string name="hide_seed_text">OK, Hide Seed Phrase</string> <string name="hide_seed_text">OK, Hide Seed Phrase</string>
<string name="ens_not_match_wallet">ENS Name does not match wallet address</string> <string name="ens_not_match_wallet">ENS Name does not match wallet address</string>

@ -412,7 +412,6 @@
<string name="dialog_load_as_contract">Load Token</string> <string name="dialog_load_as_contract">Load Token</string>
<string name="blockchain">%1$s Blockchain</string> <string name="blockchain">%1$s Blockchain</string>
<string name="currency_00" translatable="false">0.00 %s</string> <string name="currency_00" translatable="false">0.00 %s</string>
<string name="telegram">Telegram (Customer Support)</string>
<string name="transfer_request">Transfer request</string> <string name="transfer_request">Transfer request</string>
<string name="token_transfer_request">Token transfer request: %1$s</string> <string name="token_transfer_request">Token transfer request: %1$s</string>
<string name="generate_payment_request">Generate Payment Request</string> <string name="generate_payment_request">Generate Payment Request</string>
@ -776,7 +775,7 @@
<string name="disconnect">Disconnect</string> <string name="disconnect">Disconnect</string>
<string name="keep_connect">Keep Connected</string> <string name="keep_connect">Keep Connected</string>
<string name="beware_of_scammers">Beware of scammers!\nDon\'t share seed phrase.</string> <string name="beware_of_scammers">Beware of scammers!\nDon\'t share seed phrase.</string>
<string name="alphawallet_never_ask">AlphaWallet will NEVER ask about your seed phrase (especially on Telegram).</string> <string name="alphawallet_never_ask">AlphaWallet will NEVER ask about your seed phrase (and we only reply to DMs, never DM first).</string>
<string name="your_seed_phrase">Your seed phrase (do not share with anyone)</string> <string name="your_seed_phrase">Your seed phrase (do not share with anyone)</string>
<string name="hide_seed_text">OK, Hide Seed Phrase</string> <string name="hide_seed_text">OK, Hide Seed Phrase</string>
<string name="ens_not_match_wallet">ENS Name does not match wallet address</string> <string name="ens_not_match_wallet">ENS Name does not match wallet address</string>

@ -43,7 +43,6 @@ import org.robolectric.shadows.ShadowToast;
@Config(shadows = {ShadowApp.class, ShadowRealm.class, ShadowJsInjectorClient.class}) @Config(shadows = {ShadowApp.class, ShadowRealm.class, ShadowJsInjectorClient.class})
public class Web3ViewClientTest public class Web3ViewClientTest
{ {
private static final String PACKAGE_NAME_OF_TELEGRAM = "org.telegram.messenger";
private static final String URL_TG_JOIN_INVITE = "tg:join?invite=12345"; private static final String URL_TG_JOIN_INVITE = "tg:join?invite=12345";
@Rule @Rule
@ -70,23 +69,21 @@ public class Web3ViewClientTest
@Test @Test
public void should_start_trusted_app_if_installed() public void should_start_trusted_app_if_installed()
{ {
assumeAppInstalled(context, PACKAGE_NAME_OF_TELEGRAM); //NB Telegram no longer trusted app. Should not use dapp browser for this
boolean overrideUrlLoading = new Web3ViewClient(context).shouldOverrideUrlLoading(null, URL_TG_JOIN_INVITE); /*boolean overrideUrlLoading = new Web3ViewClient(context).shouldOverrideUrlLoading(null, URL_TG_JOIN_INVITE);
assertTrue(overrideUrlLoading); assertTrue(overrideUrlLoading);
Mockito.verify(context).startActivity(intentCaptor.capture()); Mockito.verify(context).startActivity(intentCaptor.capture());
Intent expectedIntent = intentCaptor.getValue(); Intent expectedIntent = intentCaptor.getValue();
assertThat(expectedIntent.getAction(), is(ACTION_VIEW)); assertThat(expectedIntent.getAction(), is(ACTION_VIEW));
assertThat(expectedIntent.getData(), is(Uri.parse(URL_TG_JOIN_INVITE))); assertThat(expectedIntent.getData(), is(Uri.parse(URL_TG_JOIN_INVITE)));
assertThat(expectedIntent.getPackage(), is(PACKAGE_NAME_OF_TELEGRAM));
assertThat(expectedIntent.getFlags(), is(FLAG_ACTIVITY_NEW_TASK)); assertThat(expectedIntent.getFlags(), is(FLAG_ACTIVITY_NEW_TASK));
assertThat(expectedIntent.getStringExtra(EXTRA_TEXT), is(URL_TG_JOIN_INVITE)); assertThat(expectedIntent.getStringExtra(EXTRA_TEXT), is(URL_TG_JOIN_INVITE));*/
} }
@Test @Test
public void should_notify_user_if_trusted_app_not_installed() throws PackageManager.NameNotFoundException public void should_notify_user_if_trusted_app_not_installed() throws PackageManager.NameNotFoundException
{ {
assumeNotAppInstalled(context, PACKAGE_NAME_OF_TELEGRAM);
boolean overrideUrlLoading = new Web3ViewClient(context).shouldOverrideUrlLoading(null, URL_TG_JOIN_INVITE); boolean overrideUrlLoading = new Web3ViewClient(context).shouldOverrideUrlLoading(null, URL_TG_JOIN_INVITE);
assertTrue(overrideUrlLoading); assertTrue(overrideUrlLoading);

@ -19,4 +19,4 @@ GitHub: https://github.com/alphawallet
Twitter: https://twitter.com/Alpha_wallet Twitter: https://twitter.com/Alpha_wallet
Reddit: https://www.reddit.com/r/AlphaWallet Reddit: https://www.reddit.com/r/AlphaWallet
Forum: https://www.tokenscript.org/ Forum: https://www.tokenscript.org/
Telegram: https://t.me/AlphaWalletGroup Discord: https://discord.gg/mx23YWRTYf

Loading…
Cancel
Save