Skip to content

Commit

Permalink
chore(example): update add to whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
tompsota committed Oct 23, 2024
1 parent 91ca6b9 commit d6ddf5a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
7 changes: 5 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ const App: React.FC = () => {
blocklistedHashes: ['FgvSehLMM91E7lX/Zqp3u4jMmd0A7hH/Iqozu0TMVd0u'],
blocklistedPackageNames: ['com.wultra.app.screenlogger'],
blocklistedPermissions: [
['android.permission.BLUETOOTH', 'android.permission.INTERNET'],
['android.permission.INTERNET'],
[
'android.permission.INTERNET',
'android.permission.ACCESS_COARSE_LOCATION',
],
['android.permission.BLUETOOTH'],
['android.permission.BATTERY_STATS'],
],
whitelistedInstallationSources: ['com.apkpure.aegon'],
Expand Down
22 changes: 12 additions & 10 deletions example/src/pages/FreeRaspDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,18 @@ const FreeRaspDemo: React.FC<{

const addItemsToMalwareWhitelist = async () => {
const appsToWhitelist = ['io.ionic.starter', 'com.example.myApp'];
appsToWhitelist.forEach(async app => {
try {
const whitelistResponse = await addToWhitelist(app);
console.info(
`${app} stored to Malware Whitelist: ${whitelistResponse}`,
);
} catch (error: any) {
console.info('Malware whitelist failed: ', error);
}
});
await Promise.all(
appsToWhitelist.map(async app => {
try {
const whitelistResponse = await addToWhitelist(app);
console.info(
`${app} stored to Malware Whitelist: ${whitelistResponse}`,
);
} catch (error) {
console.info('Malware whitelist failed: ', error);
}
}),
);
};

return (
Expand Down

0 comments on commit d6ddf5a

Please sign in to comment.