From 095038f9f6d86c402534de0e13096305c5a63655 Mon Sep 17 00:00:00 2001 From: James Brown Date: Sun, 1 Dec 2024 11:10:41 +0800 Subject: [PATCH] Add DappBrowser Whitelists (#3412) - Add DappBrowser protection for browsing non-whitelisted sites. - Lock DeveloperOverride with warning page. --- .../com/alphawallet/app/DappBrowserTest.java | 6 +-- app/src/main/AndroidManifest.xml | 16 ++++++++ app/src/main/assets/dapps_list.json | 12 +++--- .../app/entity/FinishReceiver.java | 32 +++++++++++++-- .../alphawallet/app/entity/HomeReceiver.java | 33 ++++++++++++++-- .../app/service/NotificationService.java | 2 + .../app/ui/AdvancedSettingsActivity.java | 39 ++++++++++++++++++- .../app/ui/DappBrowserFragment.java | 14 +++++++ .../com/alphawallet/app/ui/HomeActivity.java | 4 +- .../ui/RedeemSignatureDisplayActivity.java | 2 + .../app/ui/WalletConnectSessionActivity.java | 23 ++++++++--- .../app/util/DappBrowserUtils.java | 18 +++++++++ .../app/viewmodel/DappBrowserViewModel.java | 6 +++ app/src/main/res/values-es/strings.xml | 4 ++ app/src/main/res/values-fr/strings.xml | 4 ++ app/src/main/res/values-id/strings.xml | 4 ++ app/src/main/res/values-my/strings.xml | 4 ++ app/src/main/res/values-vi/strings.xml | 4 ++ app/src/main/res/values-zh/strings.xml | 4 ++ app/src/main/res/values/colors_misc.xml | 2 +- app/src/main/res/values/strings.xml | 4 ++ 21 files changed, 209 insertions(+), 28 deletions(-) diff --git a/app/src/androidTest/java/com/alphawallet/app/DappBrowserTest.java b/app/src/androidTest/java/com/alphawallet/app/DappBrowserTest.java index 26f7dd6ad5..0c6a8c1ef0 100644 --- a/app/src/androidTest/java/com/alphawallet/app/DappBrowserTest.java +++ b/app/src/androidTest/java/com/alphawallet/app/DappBrowserTest.java @@ -20,8 +20,6 @@ import static com.alphawallet.app.util.Helper.waitUntilLoaded; import static junit.framework.TestCase.assertTrue; -import static org.hamcrest.core.IsNot.not; - import android.view.KeyEvent; import androidx.annotation.NonNull; @@ -35,8 +33,8 @@ public class DappBrowserTest extends BaseE2ETest { - private static final String DEFAULT_HOME_PAGE = "https://courses.cs.washington.edu/courses/cse373/99sp/assignments/hw2/test1.html"; - private static final String URL_DAPP = "http://web.simmons.edu/~grovesd/comm244/notes/week3/html-test-page.html"; + private static final String DEFAULT_HOME_PAGE = "https://tlink.store/tapp?chain=84532&contract=0xb02082b18f74ab3853b6a11e5f487be4322167db&tokenId=6"; + private static final String URL_DAPP = "https://rarible.com/explore/all/collections"; @Override @Before diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d40dc985c0..a18a7a0fb4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -39,6 +39,22 @@ android:usesCleartextTraffic="true" tools:replace="android:name, android:theme, android:allowBackup"> + + + + + + + + + + + + + + = Build.VERSION_CODES.TIRAMISU) + { + registerReceiver(ctx, this, new IntentFilter(C.WALLET_CONNECT_COUNT_CHANGE), RECEIVER_NOT_EXPORTED); + } + else + { + broadcastManager.registerReceiver(this, new IntentFilter(C.PRUNE_ACTIVITY)); + } } @Override @@ -35,6 +52,13 @@ public void onReceive(Context context, Intent intent) public void unregister() { - broadcastManager.unregisterReceiver(this); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) + { + activity.unregisterReceiver(this); + } + else + { + broadcastManager.unregisterReceiver(this); + } } } diff --git a/app/src/main/java/com/alphawallet/app/entity/HomeReceiver.java b/app/src/main/java/com/alphawallet/app/entity/HomeReceiver.java index a5f9c74b32..505d1b8337 100644 --- a/app/src/main/java/com/alphawallet/app/entity/HomeReceiver.java +++ b/app/src/main/java/com/alphawallet/app/entity/HomeReceiver.java @@ -1,11 +1,15 @@ package com.alphawallet.app.entity; +import static androidx.core.content.ContextCompat.registerReceiver; + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.os.Build; import android.os.Bundle; +import androidx.core.content.ContextCompat; import androidx.localbroadcastmanager.content.LocalBroadcastManager; import com.alphawallet.app.C; @@ -21,6 +25,12 @@ public HomeReceiver(Context context, HomeCommsInterface homeCommsInterface) this.homeCommsInterface = homeCommsInterface; } + public HomeReceiver() + { + homeCommsInterface = null; + broadcastManager = null; + } + @Override public void onReceive(Context context, Intent intent) { @@ -42,17 +52,32 @@ public void onReceive(Context context, Intent intent) } } - public void register() + public void register(Context ctx) { IntentFilter filter = new IntentFilter(); filter.addAction(C.REQUEST_NOTIFICATION_ACCESS); filter.addAction(C.BACKUP_WALLET_SUCCESS); filter.addAction(C.WALLET_CONNECT_REQUEST); - broadcastManager.registerReceiver(this, filter); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) + { + registerReceiver(ctx, this, new IntentFilter(C.WALLET_CONNECT_COUNT_CHANGE), ContextCompat.RECEIVER_NOT_EXPORTED); + } + else + { + broadcastManager.registerReceiver(this, filter); + } } - public void unregister() + public void unregister(Context ctx) { - broadcastManager.unregisterReceiver(this); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) + { + ctx.unregisterReceiver(this); + } + else + { + broadcastManager.unregisterReceiver(this); + } } } diff --git a/app/src/main/java/com/alphawallet/app/service/NotificationService.java b/app/src/main/java/com/alphawallet/app/service/NotificationService.java index 180d0f5cc0..b4d88af13a 100644 --- a/app/src/main/java/com/alphawallet/app/service/NotificationService.java +++ b/app/src/main/java/com/alphawallet/app/service/NotificationService.java @@ -19,6 +19,7 @@ import com.alphawallet.app.C; import com.alphawallet.app.R; +import com.alphawallet.app.entity.HomeReceiver; import com.alphawallet.app.ui.HomeActivity; /** @@ -148,6 +149,7 @@ private void checkNotificationPermission() != PackageManager.PERMISSION_DENIED)) { Intent intent = new Intent(C.REQUEST_NOTIFICATION_ACCESS); + intent.setPackage("com.alphawallet.app.entity.HomeReceiver"); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } } diff --git a/app/src/main/java/com/alphawallet/app/ui/AdvancedSettingsActivity.java b/app/src/main/java/com/alphawallet/app/ui/AdvancedSettingsActivity.java index 58534c9f3a..e9f051927a 100644 --- a/app/src/main/java/com/alphawallet/app/ui/AdvancedSettingsActivity.java +++ b/app/src/main/java/com/alphawallet/app/ui/AdvancedSettingsActivity.java @@ -159,9 +159,46 @@ private void initializeSettings() tokenScriptViewer.setToggleState(viewModel.getTokenScriptViewerState()); } + @FunctionalInterface + public interface Callback + { + void onResult(boolean choice); + } + private void onDeveloperOverride() { - viewModel.toggleDeveloperOverride(developerOverride.getToggleState()); + boolean developerOverrideState = developerOverride.getToggleState(); + if (developerOverrideState) + { + //display warning popup + showWarningPopup(R.string.developer_override_warning, result -> { + viewModel.toggleDeveloperOverride(result); + developerOverride.setToggleState(result); + }); + } + else + { + viewModel.toggleDeveloperOverride(developerOverride.getToggleState()); + } + } + + private void showWarningPopup(int message, Callback callback) + { + AWalletAlertDialog dialog = new AWalletAlertDialog(this); + dialog.setIcon(AWalletAlertDialog.WARNING); + dialog.setTitle(R.string.warning); + dialog.setMessage(message); + dialog.setButtonText(R.string.i_accept); + dialog.setButtonListener(v -> { + callback.onResult(true); + dialog.dismiss(); + }); + dialog.setSecondaryButtonText(R.string.action_cancel); + dialog.setSecondaryButtonListener(v -> { + callback.onResult(false); + dialog.dismiss(); + }); + dialog.show(); } private void onFullScreenClicked() diff --git a/app/src/main/java/com/alphawallet/app/ui/DappBrowserFragment.java b/app/src/main/java/com/alphawallet/app/ui/DappBrowserFragment.java index dc45a2c937..2bc870b741 100644 --- a/app/src/main/java/com/alphawallet/app/ui/DappBrowserFragment.java +++ b/app/src/main/java/com/alphawallet/app/ui/DappBrowserFragment.java @@ -1,5 +1,6 @@ package com.alphawallet.app.ui; +import static com.alphawallet.app.C.ALPHAWALLET_WEB; import static com.alphawallet.app.C.ETHER_DECIMALS; import static com.alphawallet.app.C.RESET_TOOLBAR; import static com.alphawallet.app.entity.tokens.Token.TOKEN_BALANCE_PRECISION; @@ -1485,10 +1486,22 @@ public void onWebpageLoadComplete() private boolean loadUrl(String urlText) { + requireContext(); AnalyticsProperties props = new AnalyticsProperties(); props.put(Analytics.PROPS_URL, urlText); viewModel.track(Analytics.Action.LOAD_URL, props); + // ensure the URL is whitelisted, that is it is featured in the dapp list, and check if the app is in developer override mode + if (!viewModel.getDeveloperOverrideState(getContext()) && !DappBrowserUtils.isInDappsList(this.getContext(), urlText)) + { + //reset url string back to AlphaWallet + setUrlText(ALPHAWALLET_WEB); + + //display a warning dialog + displayError(R.string.title_dialog_error, R.string.not_recommended_to_visit); + return false; + } + detachFragments(); addToBackStack(DAPP_BROWSER); cancelSearchSession(); @@ -1500,6 +1513,7 @@ else if (handlePrefix(urlText)) { return true; } + web3.resetView(); web3.loadUrl(Utils.formatUrl(urlText)); setUrlText(Utils.formatUrl(urlText)); diff --git a/app/src/main/java/com/alphawallet/app/ui/HomeActivity.java b/app/src/main/java/com/alphawallet/app/ui/HomeActivity.java index 57d365aa22..f2f7a65d76 100644 --- a/app/src/main/java/com/alphawallet/app/ui/HomeActivity.java +++ b/app/src/main/java/com/alphawallet/app/ui/HomeActivity.java @@ -582,7 +582,7 @@ protected void onResume() if (homeReceiver == null) { homeReceiver = new HomeReceiver(this, this); - homeReceiver.register(); + homeReceiver.register(this); } initViews(); } @@ -669,7 +669,7 @@ public void onDestroy() viewModel.onClean(); if (homeReceiver != null) { - homeReceiver.unregister(); + homeReceiver.unregister(this); homeReceiver = null; } } diff --git a/app/src/main/java/com/alphawallet/app/ui/RedeemSignatureDisplayActivity.java b/app/src/main/java/com/alphawallet/app/ui/RedeemSignatureDisplayActivity.java index 85754cb482..cdfa00a256 100644 --- a/app/src/main/java/com/alphawallet/app/ui/RedeemSignatureDisplayActivity.java +++ b/app/src/main/java/com/alphawallet/app/ui/RedeemSignatureDisplayActivity.java @@ -180,6 +180,8 @@ private void onBurned(Boolean burn) dialog.setTitle(R.string.ticket_redeemed); dialog.setIcon(AWalletAlertDialog.SUCCESS); dialog.setOnDismissListener(v -> { + Intent pruneIntent = new Intent(PRUNE_ACTIVITY); + pruneIntent.setPackage("com.alphawallet.app.entity.FinishReceiver"); LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent(PRUNE_ACTIVITY)); }); dialog.show(); diff --git a/app/src/main/java/com/alphawallet/app/ui/WalletConnectSessionActivity.java b/app/src/main/java/com/alphawallet/app/ui/WalletConnectSessionActivity.java index 9c01cc8c95..9a2093157e 100644 --- a/app/src/main/java/com/alphawallet/app/ui/WalletConnectSessionActivity.java +++ b/app/src/main/java/com/alphawallet/app/ui/WalletConnectSessionActivity.java @@ -2,12 +2,11 @@ import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; -import static androidx.core.content.ContentProviderCompat.requireContext; - import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Looper; @@ -24,7 +23,6 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.PopupMenu; import androidx.lifecycle.ViewModelProvider; import androidx.localbroadcastmanager.content.LocalBroadcastManager; @@ -60,6 +58,7 @@ public class WalletConnectSessionActivity extends BaseActivity { private final Handler handler = new Handler(Looper.getMainLooper()); private LocalBroadcastManager broadcastManager; + private WalletConnectViewModel viewModel; private RecyclerView recyclerView; private Button btnConnectWallet; @@ -246,12 +245,26 @@ public void onSessionDisconnected() private void startConnectionCheck() { - broadcastManager.registerReceiver(walletConnectChangeReceiver, new IntentFilter(C.WALLET_CONNECT_COUNT_CHANGE)); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) + { + registerReceiver(walletConnectChangeReceiver, new IntentFilter(C.WALLET_CONNECT_COUNT_CHANGE), RECEIVER_NOT_EXPORTED); + } + else + { + broadcastManager.registerReceiver(walletConnectChangeReceiver, new IntentFilter(C.WALLET_CONNECT_COUNT_CHANGE)); + } } private void stopConnectionCheck() { - broadcastManager.unregisterReceiver(walletConnectChangeReceiver); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) + { + unregisterReceiver(walletConnectChangeReceiver); + } + else + { + broadcastManager.unregisterReceiver(walletConnectChangeReceiver); + } } public class CustomAdapter extends RecyclerView.Adapter diff --git a/app/src/main/java/com/alphawallet/app/util/DappBrowserUtils.java b/app/src/main/java/com/alphawallet/app/util/DappBrowserUtils.java index 43eedd4c89..ffc3f941cb 100644 --- a/app/src/main/java/com/alphawallet/app/util/DappBrowserUtils.java +++ b/app/src/main/java/com/alphawallet/app/util/DappBrowserUtils.java @@ -13,6 +13,7 @@ import com.alphawallet.app.C; import com.alphawallet.app.entity.DApp; +import com.google.android.gms.common.util.HttpUtils; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -253,6 +254,23 @@ public static List getDappsList(Context context) return dapps; } + public static boolean isInDappsList(Context context, String candidateURL) + { + List knownDapps = getDappsList(context); + //strip the URL to get only the domain + String candidateDomain = Utils.getDomainName(candidateURL); + + for (DApp dapp : knownDapps) + { + String thisDomain = Utils.getDomainName(dapp.getUrl()); + if (candidateDomain.equals(thisDomain)) + { + return true; + } + } + return false; + } + private static void saveHistory(Context context, List history) { if (context != null) diff --git a/app/src/main/java/com/alphawallet/app/viewmodel/DappBrowserViewModel.java b/app/src/main/java/com/alphawallet/app/viewmodel/DappBrowserViewModel.java index 6cc8585058..3955d65633 100644 --- a/app/src/main/java/com/alphawallet/app/viewmodel/DappBrowserViewModel.java +++ b/app/src/main/java/com/alphawallet/app/viewmodel/DappBrowserViewModel.java @@ -1,6 +1,7 @@ package com.alphawallet.app.viewmodel; import static com.alphawallet.app.C.Key.WALLET; +import static com.alphawallet.app.repository.SharedPreferenceRepository.DEVELOPER_OVERRIDE; import static com.alphawallet.app.util.Utils.isValidUrl; import android.app.Activity; @@ -481,4 +482,9 @@ public GasService getGasService() { return gasService; } + + public boolean getDeveloperOverrideState(Context context) + { + return PreferenceManager.getDefaultSharedPreferences(context).getBoolean(DEVELOPER_OVERRIDE, false); + } } diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index e6677c60ab..f3e7d03ba2 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -996,4 +996,8 @@ Es posible que esté a punto de firmar una transacción sin saberlo, lo que podría vaciar sus fondos. Es posible que desee firmar el código de bytes como desarrollador y puede anular esta advertencia si configura el modo de desarrollador en la configuración avanzada. Constructor Visor de TokenScript + Esta URL no está en la lista blanca. Aún es posible visitarla modificando las opciones de protección en la configuración, pero no se recomienda. Podrías estar a punto de perder tus fondos, especialmente si se trata de una inversión en minería de criptomonedas. Hay muchos sitios de inversión en criptomonedas regulados. + Advertencia: estás a punto de desactivar la protección estándar. Esto evita que te estafen. Utiliza el modo de desarrollador solo si estás probando tu dapp o si estás 100 \% seguro de que el sitio es seguro. Recuerda: si alguien te dice que actives esta configuración, es casi seguro que perderás tus fondos de criptomonedas. + Advertencia + Acepto el riesgo diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 7a89ba1805..1f36b80825 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -1010,4 +1010,8 @@ Vous êtes peut-être sur le point de signer sans le savoir une transaction, ce qui pourrait vider vos fonds. Vous souhaiterez peut-être signer le bytecode en tant que développeur et vous pouvez ignorer cet avertissement si vous définissez le mode développeur dans les paramètres avancés. Constructor Visionneuse TokenScript + Cette URL n\'est pas sur liste blanche. Il est toujours possible de la visiter en modifiant les options de protection dans les paramètres, mais cela n\'est pas recommandé. Vous pourriez être sur le point de perdre vos fonds, surtout s\'il s\'agit d\'un investissement dans le minage de crypto-monnaies. Il existe de nombreux sites d\'investissement en crypto-monnaies réglementés. + Attention : vous êtes sur le point de désactiver la protection standard. Cela vous évite de vous faire arnaquer. N\'utilisez le mode développeur que si vous testez votre dapp ou si vous êtes sûr à 100 \% que le site est sûr. N\'oubliez pas : si quelqu\'un vous dit d\'activer ce paramètre, vous êtes presque certainement sur le point de perdre vos fonds cryptographiques. + Attention + J\'accepte le risque diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index c5dd9e7c50..efbefbe3e7 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -1001,4 +1001,8 @@ Anda mungkin tanpa sadar menandatangani transaksi, yang dapat mengosongkan dana Anda. Anda mungkin ingin menandatangani bytecode sebagai pengembang, dan Anda dapat mengabaikan peringatan ini jika Anda menyetel mode pengembang di Setelan lanjutan. Constructor Penampil TokenScript + URL ini tidak masuk daftar putih. Anda masih dapat mengunjunginya dengan mengubah opsi perlindungan di pengaturan, tetapi tidak disarankan. Anda bisa kehilangan dana, terutama jika itu adalah investasi dalam penambangan kripto. Ada banyak situs investasi kripto yang teregulasi. + Peringatan: Anda akan menonaktifkan perlindungan standar. Ini mencegah Anda dari penipuan. Gunakan mode pengembang hanya jika Anda sedang menguji dapp Anda, atau jika Anda 100\% yakin bahwa situs tersebut aman. Ingat: jika seseorang memberi tahu Anda untuk mengaktifkan pengaturan ini, Anda hampir pasti akan kehilangan dana kripto Anda. + Peringatan + Saya menerima risikonya diff --git a/app/src/main/res/values-my/strings.xml b/app/src/main/res/values-my/strings.xml index 44938aead2..b6c3d2a7b4 100644 --- a/app/src/main/res/values-my/strings.xml +++ b/app/src/main/res/values-my/strings.xml @@ -1031,4 +1031,8 @@ သင့်ငွေများကို အချည်းနှီးဖြစ်စေနိုင်သည့် ငွေပေးငွေယူတစ်ခုအား သင်မသိလိုက်ဘဲ လက်မှတ်ထိုးပါတော့မည်။ သင်သည် ဆော့ဖ်ဝဲအင်ဂျင်နီယာတစ်ဦးအနေဖြင့် bytecode ကို လက်မှတ်ထိုးလိုနိုင်ပြီး၊ Advanced ဆက်တင်များတွင် developer မုဒ်ကို သင်သတ်မှတ်ပါက ဤသတိပေးချက်ကို အစားထိုးနိုင်ပါသည်။ Constructor TokenScript ကြည့်ရှုသူ + ဤ URL ကို တရားဝင်စာရင်းမသွင်းပါ။ ဆက်တင်များတွင် အကာအကွယ်ရွေးချယ်မှုများ ပြောင်းလဲခြင်းဖြင့် ဝင်ကြည့်ရန် ဖြစ်နိုင်သေးသော်လည်း ၎င်းကို အကြံပြုထားခြင်း မရှိပါ။ အထူးသဖြင့် crypto-mining တွင် ရင်းနှီးမြုပ်နှံပါက သင့်ရန်ပုံငွေများ ဆုံးရှုံးတော့မည်ဖြစ်သည်။ ထိန်းညှိထားသော crypto ရင်းနှီးမြှုပ်နှံမှုဆိုက်များစွာရှိသည်။ + သတိပေးချက်- သင်သည် စံကာကွယ်ရေးကို ပိတ်ပါတော့မည်။ ၎င်းသည် သင့်အား အလိမ်ခံရခြင်းမှ ကာကွယ်ပေးသည်။ သင့် dapp ကို စမ်းသပ်နေပါက သို့မဟုတ် ဆိုက်သည် 100% စိတ်ချရကြောင်း 100\% သေချာပါက developer မုဒ်ကို အသုံးပြုပါ။ သတိရပါ- တစ်စုံတစ်ယောက်က ဤဆက်တင်ကိုဖွင့်ရန် သင့်အားပြောနေပါက၊ သင်သည် သင်၏ crypto ရန်ပုံငွေများကို ဆုံးရှုံးတော့မည်မှာ သေချာပါသည်။ + သတိပေးချက် + အန္တရာယ်ကို ငါလက်ခံတယ်။ diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 66cef1f537..7de9a91883 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -1010,4 +1010,8 @@ Bạn có thể sắp vô tình ký một giao dịch, điều này có thể khiến tiền của bạn bị rỗng. Bạn có thể muốn ký mã byte với tư cách là nhà phát triển và bạn có thể ghi đè cảnh báo này nếu bạn đặt chế độ nhà phát triển trong cài đặt Nâng cao. Constructor Trình xem TokenScript + URL này không nằm trong danh sách trắng. Bạn vẫn có thể truy cập bằng cách thay đổi tùy chọn bảo vệ trong cài đặt, nhưng không được khuyến khích. Bạn có thể sắp mất tiền, đặc biệt nếu đó là khoản đầu tư vào khai thác tiền điện tử. Có rất nhiều trang web đầu tư tiền điện tử được quản lý. + Cảnh báo: Bạn sắp tắt chế độ bảo vệ tiêu chuẩn. Điều này giúp bạn tránh bị lừa đảo. Chỉ sử dụng chế độ nhà phát triển nếu bạn đang thử nghiệm dapp của mình hoặc nếu bạn chắc chắn 100\% rằng trang web an toàn. Hãy nhớ rằng: nếu ai đó bảo bạn bật cài đặt này, bạn gần như chắc chắn sẽ mất tiền mã hóa của mình. + Cảnh báo + Tôi chấp nhận rủi ro diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 261d8e2244..430cef0f80 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -997,4 +997,8 @@ 您可能会在不知情的情况下签署一项交易,这可能会清空您的资金。 您可能希望以开发人员的身份对字节码进行签名,如果您在高级设置中设置开发人员模式,则可以覆盖此警告。 Constructor 使用 TokenScript 查看器 + 此 URL 未列入白名单。仍可通过更改设置中的保护选项来访问,但不建议这样做。您可能会损失资金,尤其是如果这是对加密货币挖矿的投资。有很多受监管的加密货币投资网站。 + 警告:您即将关闭标准保护。这可以防止您被骗。仅在测试 dapp 或 100\% 确定网站安全时才使用开发者模式。请记住:如果有人告诉您打开此设置,您几乎肯定会失去您的加密货币资金。 + 警告 + 我接受风险 diff --git a/app/src/main/res/values/colors_misc.xml b/app/src/main/res/values/colors_misc.xml index fade36fe38..f44d5652f8 100644 --- a/app/src/main/res/values/colors_misc.xml +++ b/app/src/main/res/values/colors_misc.xml @@ -34,7 +34,7 @@ #40678c #83488c #93589c - #FE3300 + #9FD009 #414597 #00D4D5 #6BBE47 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 34530750c1..482e286c93 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1073,4 +1073,8 @@ You might be about to unknowingly sign a transaction, which could empty your funds. You may want to sign bytecode as a developer, and you can override this warning if you set developer mode in Advanced settings. Constructor Use TokenScript Viewer + This URL is not whitelisted. It is still possible to visit by changing protection options in the settings, but it is not recommended. You could be about to lose your funds, especially if it\'s an investment in crypto-mining. There are plenty of regulated crypto investment sites. + Warning: You are about to switch off standard protection. This prevents you from getting scammed. Only use the developer mode if you are testing your dapp, or if you are 100\% sure that the site is safe. Remember: if someone is telling you to switch this setting on, you are almost certainly about to lose your crypto funds. + Warning + I accept the risk