ADD: warning when importing a watch-only wallet so less people will fall victim for scam

This commit is contained in:
overtorment 2022-10-08 02:02:05 +01:00 committed by Overtorment
parent 52bb048f23
commit 4040b02b0e
2 changed files with 3 additions and 2 deletions

View file

@ -6,7 +6,7 @@ import { useAsyncStorage } from '@react-native-async-storage/async-storage';
import { FiatUnit } from '../models/fiatUnit';
import Notifications from '../blue_modules/notifications';
import loc, { STORAGE_KEY as LOC_STORAGE_KEY } from '../loc';
import { LegacyWallet } from '../class';
import { LegacyWallet, WatchOnlyWallet } from '../class';
import { isTorDaemonDisabled, setIsTorDaemonDisabled } from './environment';
import alert from '../components/Alert';
const BlueApp = require('../BlueApp');
@ -190,7 +190,7 @@ export const BlueStorageProvider = ({ children }) => {
addWallet(w);
await saveToDisk();
A(A.ENUM.CREATED_WALLET);
Alert.alert('', loc.wallets.import_success);
Alert.alert('', w.type === WatchOnlyWallet.type ? loc.wallets.import_success_watchonly : loc.wallets.import_success);
Notifications.majorTomToGroundControl(w.getAllExternalAddresses(), [], []);
// start balance fetching at the background
await w.fetchBalance();

View file

@ -417,6 +417,7 @@
"import_imported": "Imported",
"import_scan_qr": "Scan or import a file",
"import_success": "Your wallet has been successfully imported.",
"import_success_watchonly": "Your wallet has been successfully imported. WARNING: This is a watch-only wallet, you can NOT spend from it.",
"import_search_accounts": "Search accounts",
"import_title": "Import",
"import_discovery_title": "Discovery",