Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(8718): modify nearby devices permission wording + related enum #8730

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/components/UI/LedgerModals/LedgerConfirmationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ const LedgerConfirmationModal = ({

if (bluetoothPermissionError && !permissionErrorShown) {
switch (bluetoothPermissionError) {
case BluetoothPermissionErrors.LocationAccessBlocked:
case BluetoothPermissionErrors.NearbyDevicesAccessBlocked:
setErrorDetails({
title: strings('ledger.location_access_blocked'),
subtitle: strings('ledger.location_access_blocked_error'),
title: strings('ledger.nearbyDevices_access_blocked'),
subtitle: strings('ledger.nearbyDevices_access_blocked_message'),
});
break;
case BluetoothPermissionErrors.BluetoothAccessBlocked:
Expand Down
8 changes: 5 additions & 3 deletions app/components/Views/LedgerConnect/Scan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ const Scan = ({
},
});
break;
case BluetoothPermissionErrors.LocationAccessBlocked:
case BluetoothPermissionErrors.NearbyDevicesAccessBlocked:
onScanningErrorStateChanged({
errorTitle: strings('ledger.location_access_blocked'),
errorSubtitle: strings('ledger.location_access_blocked_message'),
errorTitle: strings('ledger.nearbyDevices_access_blocked'),
errorSubtitle: strings(
'ledger.nearbyDevices_access_blocked_message',
),
primaryButtonConfig: {
title: strings('ledger.view_settings'),
onPress: async () => {
Expand Down
3 changes: 2 additions & 1 deletion app/components/hooks/useBluetoothPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Device from '../../util/device';
export enum BluetoothPermissionErrors {
BluetoothAccessBlocked = 'BluetoothAccessBlocked',
LocationAccessBlocked = 'LocationAccessBlocked',
NearbyDevicesAccessBlocked = 'NearbyDevicesAccessBlocked',
}

const useBluetoothPermissions = () => {
Expand Down Expand Up @@ -64,7 +65,7 @@ const useBluetoothPermissions = () => {
setBluetoothPermissionError(undefined);
} else {
setBluetoothPermissionError(
BluetoothPermissionErrors.LocationAccessBlocked,
BluetoothPermissionErrors.NearbyDevicesAccessBlocked,
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions locales/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2699,8 +2699,8 @@
"bluetooth_off_message": "Please turn on Bluetooth for your device",
"bluetooth_access_blocked": "Ledger needs Bluetooth access to pair with your mobile device.",
"bluetooth_access_blocked_message": "If you want to pair your Ledger device using Bluetooth, enable it in Settings & try again.",
"location_access_blocked": "Ledger needs location access to pair with your mobile device.",
"location_access_blocked_message": "If you want to pair your Ledger device using Bluetooth, you’ll need to enable location access in Settings & try again.",
"nearbyDevices_access_blocked": "MetaMask needs permission to nearby devices to pair with your Ledger.",
"nearbyDevices_access_blocked_message": "If you want to pair your Ledger device using Bluetooth, you’ll need to enable nearby devices access in Settings & try again.",
"bluetooth_scanning_error": "Error while scanning the device",
"bluetooth_scanning_error_message": "Please make sure your device is unlocked and the Ethereum app is running",
"bluetooth_connection_failed": "Bluetooth connection failed",
Expand Down
Loading