Skip to content

Commit

Permalink
fix: Update permission array type
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljscript committed Dec 1, 2022
1 parent 326eca5 commit 4e8e4ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/legacy/ledgerUtils.ts
Expand Up @@ -493,13 +493,13 @@ export const signTxWithLedger = async (
const BLUETOOTH_SCAN = 'android.permission.BLUETOOTH_SCAN'
const BLUETOOTH_CONNECT = 'android.permission.BLUETOOTH_CONNECT'
export const getLedgerPermissions = () => {
const permissions: Array<string> = [PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION]
const permissions: Array<Permission> = [PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION]
if (Platform.Version >= 31) {
permissions.push(BLUETOOTH_CONNECT)
permissions.push(BLUETOOTH_SCAN)
permissions.push(BLUETOOTH_CONNECT as Permission)
permissions.push(BLUETOOTH_SCAN as Permission)
}
// hack
return permissions as unknown as Permission[]

return permissions
}

export const requestLedgerPermissions = async () => {
Expand Down

0 comments on commit 4e8e4ab

Please sign in to comment.