This commit is contained in:
Marcos Rodriguez Velez 2025-01-05 13:47:26 -04:00
parent 9555e5927e
commit 7d60b6fc8c
5 changed files with 13 additions and 34 deletions

View File

@ -1,5 +1,5 @@
{ {
"originHash" : "89509f555bc90a15b96ca0a326a69850770bdaac04a46f9cf482d81533702e3c", "originHash" : "52530e6b1e3a85c8854952ef703a6d1bbe1acd82713be2b3166476b9b277db23",
"pins" : [ "pins" : [
{ {
"identity" : "bugsnag-cocoa", "identity" : "bugsnag-cocoa",
@ -19,6 +19,15 @@
"version" : "6.2.2" "version" : "6.2.2"
} }
}, },
{
"identity" : "keychain-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/evgenyneu/keychain-swift.git",
"state" : {
"revision" : "5e1b02b6a9dac2a759a1d5dbc175c86bd192a608",
"version" : "24.0.0"
}
},
{ {
"identity" : "swift_qrcodejs", "identity" : "swift_qrcodejs",
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",

View File

@ -254,14 +254,13 @@
"electrum_settings_server": "Electrum Server", "electrum_settings_server": "Electrum Server",
"electrum_status": "Status", "electrum_status": "Status",
"electrum_preferred_server": "Preferred Server", "electrum_preferred_server": "Preferred Server",
"electrum_preferred_server_description": "Enter the server you want your wallet to use for all Bitcoin activities. Once set, your wallet will exclusively use this server to check balances, send transactions, and fetch network data. Ensure you trust this server before setting it.", "electrum_clear_alert_title": "Clear history?", "electrum_preferred_server_description": "Enter the server you want your wallet to use for all Bitcoin activities. Once set, your wallet will exclusively use this server to check balances, send transactions, and fetch network data. Ensure you trust this server before setting it.",
"electrum_clear_alert_message": "Do you want to clear electrum servers history?", "electrum_clear_alert_message": "Do you want to clear electrum servers history?",
"electrum_clear_alert_cancel": "Cancel", "electrum_clear_alert_cancel": "Cancel",
"electrum_unable_to_connect": "Unable to connect to {server}.", "electrum_unable_to_connect": "Unable to connect to {server}.",
"electrum_history": "History", "electrum_history": "History",
"electrum_reset_to_default": "This will let BlueWallet randomly choose a server from the suggested list and history. Your server history will remain unchanged.", "electrum_reset_to_default": "This will let BlueWallet randomly choose a server from the suggested list and history. Your server history will remain unchanged.",
"electrum_reset": "Reset to default", "electrum_reset": "Reset to default",
"electrum_clear": "Clear History",
"encrypt_decrypt": "Decrypt Storage", "encrypt_decrypt": "Decrypt Storage",
"encrypt_decrypt_q": "Are you sure you want to decrypt your storage? This will allow your wallets to be accessed without a password.", "encrypt_decrypt_q": "Are you sure you want to decrypt your storage? This will allow your wallets to be accessed without a password.",
"encrypt_enc_and_pass": "Encrypted and Password Protected", "encrypt_enc_and_pass": "Encrypted and Password Protected",

View File

@ -49,7 +49,6 @@
"default_info": "Normal info", "default_info": "Normal info",
"default_title": "As you launch", "default_title": "As you launch",
"default_wallets": "See all your wallets", "default_wallets": "See all your wallets",
"electrum_clear_alert_title": "You wan clear history?",
"electrum_clear_alert_message": "You wan clear electrum servers history?", "electrum_clear_alert_message": "You wan clear electrum servers history?",
"electrum_clear_alert_cancel": "Cancel", "electrum_clear_alert_cancel": "Cancel",
"electrum_clear_alert_ok": "Ok", "electrum_clear_alert_ok": "Ok",

View File

@ -153,13 +153,6 @@ const ElectrumSettings: React.FC = () => {
} }
}, [server]); }, [server]);
const clearHistory = useCallback(async () => {
setIsLoading(true);
await DefaultPreference.clear(BlueElectrum.ELECTRUM_SERVER_HISTORY);
setServerHistory(new Set());
setIsLoading(false);
}, []);
const serverExists = useCallback( const serverExists = useCallback(
(value: ElectrumServerItem) => { (value: ElectrumServerItem) => {
return Array.from(serverHistory).some(s => `${s.host}:${s.tcp}:${s.ssl}` === `${value.host}:${value.tcp}:${value.ssl}`); return Array.from(serverHistory).some(s => `${s.host}:${s.tcp}:${s.ssl}` === `${value.host}:${value.tcp}:${value.ssl}`);
@ -220,14 +213,6 @@ const ElectrumSettings: React.FC = () => {
[save], [save],
); );
const clearHistoryAlert = useCallback(() => {
triggerHapticFeedback(HapticFeedbackTypes.ImpactHeavy);
Alert.alert(loc.settings.electrum_clear_alert_title, loc.settings.electrum_clear_alert_message, [
{ text: loc.settings.electrum_clear_alert_cancel, onPress: () => console.log('Cancel Pressed'), style: 'cancel' },
{ text: loc._.ok, onPress: () => clearHistory() },
]);
}, [clearHistory]);
const presentSelectServerAlert = useCallback( const presentSelectServerAlert = useCallback(
(value: ElectrumServerItem) => { (value: ElectrumServerItem) => {
triggerHapticFeedback(HapticFeedbackTypes.ImpactHeavy); triggerHapticFeedback(HapticFeedbackTypes.ImpactHeavy);
@ -299,9 +284,6 @@ const ElectrumSettings: React.FC = () => {
} }
}); });
break; break;
case CommonToolTipActions.ClearHistory.id:
clearHistoryAlert();
break;
default: default:
try { try {
selectServer(id); selectServer(id);
@ -312,7 +294,7 @@ const ElectrumSettings: React.FC = () => {
} }
} }
}, },
[presentSelectServerAlert, presentDeleteServerAlert, clearHistoryAlert, fetchData, selectServer], [presentSelectServerAlert, presentDeleteServerAlert, fetchData, selectServer],
); );
type TCreateServerActionParameters = { type TCreateServerActionParameters = {
@ -404,7 +386,7 @@ const ElectrumSettings: React.FC = () => {
id: 'server_history', id: 'server_history',
text: loc.settings.electrum_history, text: loc.settings.electrum_history,
displayInline: serverHistory.size <= 5 && serverHistory.size > 0, displayInline: serverHistory.size <= 5 && serverHistory.size > 0,
subactions: [CommonToolTipActions.ClearHistory, ...serverSubactions], subactions: serverSubactions,
hidden: serverHistory.size === 0, hidden: serverHistory.size === 0,
}); });
} }

View File

@ -22,7 +22,6 @@ const keys = {
ClearClipboard: 'clearClipboard', ClearClipboard: 'clearClipboard',
PaymentsCode: 'paymentsCode', PaymentsCode: 'paymentsCode',
ResetToDefault: 'resetToDefault', ResetToDefault: 'resetToDefault',
ClearHistory: 'clearHistory',
ScanQR: 'scan_qr', ScanQR: 'scan_qr',
RemoveAllRecipients: 'RemoveAllRecipients', RemoveAllRecipients: 'RemoveAllRecipients',
AddRecipient: 'AddRecipient', AddRecipient: 'AddRecipient',
@ -78,9 +77,6 @@ const icons = {
CoinControl: { iconValue: 'switch.2' }, CoinControl: { iconValue: 'switch.2' },
CoSignTransaction: { iconValue: 'signature' }, CoSignTransaction: { iconValue: 'signature' },
PaymentsCode: { iconValue: 'qrcode.viewfinder' }, PaymentsCode: { iconValue: 'qrcode.viewfinder' },
ClearHistory: {
iconValue: 'trash',
},
RemoveAllRecipients: { iconValue: 'person.2.slash' }, RemoveAllRecipients: { iconValue: 'person.2.slash' },
AddRecipient: { iconValue: 'person.badge.plus' }, AddRecipient: { iconValue: 'person.badge.plus' },
RemoveRecipient: { iconValue: 'person.badge.minus' }, RemoveRecipient: { iconValue: 'person.badge.minus' },
@ -327,12 +323,6 @@ export const CommonToolTipActions: Record<string, ToolTipAction> = {
text: loc.settings.electrum_reset, text: loc.settings.electrum_reset,
hidden: false, hidden: false,
}, },
ClearHistory: {
id: keys.ClearHistory,
text: loc.settings.electrum_clear,
icon: icons.ClearHistory,
destructive: true,
},
PasteFromClipboard: { PasteFromClipboard: {
id: keys.PasteFromClipboard, id: keys.PasteFromClipboard,
text: loc.wallets.paste_from_clipboard, text: loc.wallets.paste_from_clipboard,