Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Remove deprecated method (#957)

Leendert de Borst3240c3760a61
diff --git a/apps/browser-extension/src/utils/WebApiService.ts b/apps/browser-extension/src/utils/WebApiService.ts
index a0d873e16..3f0fb2020 100644
--- a/apps/browser-extension/src/utils/WebApiService.ts
+++ b/apps/browser-extension/src/utils/WebApiService.ts
@@ -343,33 +343,4 @@ export class WebApiService {
return result;
}
-
- /**
- * Convert a Blob to a Base64 string.
- */
- private async blobToBase64(blob: Blob): Promise<string> {
- return new Promise((resolve, reject) => {
- const reader = new FileReader();
-
- /**
- * When the reader has finished loading, convert the result to a Base64 string.
- */
- reader.onloadend = (): void => {
- const result = reader.result;
- if (typeof result === 'string') {
- resolve(result.split(',')[1]); // Remove the data URL prefix
- } else {
- reject(new Error('Failed to convert Blob to Base64.'));
- }
- };
-
- /**
- * If the reader encounters an error, reject the promise with a proper Error object.
- */
- reader.onerror = (): void => {
- reject(new Error('Failed to read blob as Data URL'));
- };
- reader.readAsDataURL(blob);
- });
- }
}
diff --git a/apps/mobile-app/utils/WebApiService.ts b/apps/mobile-app/utils/WebApiService.ts
index ac2d20dd6..cd8d3dbfc 100644
--- a/apps/mobile-app/utils/WebApiService.ts
+++ b/apps/mobile-app/utils/WebApiService.ts
@@ -359,33 +359,4 @@ export class WebApiService {
await AsyncStorage.setItem('accessToken', accessToken);
await AsyncStorage.setItem('refreshToken', refreshToken);
}
-
- /**
- * Convert a Blob to a Base64 string.
- */
- private async blobToBase64(blob: Blob): Promise<string> {
- return new Promise((resolve, reject) => {
- const reader = new FileReader();
-
- /**
- * When the reader has finished loading, convert the result to a Base64 string.
- */
- reader.onloadend = (): void => {
- const result = reader.result;
- if (typeof result === 'string') {
- resolve(result.split(',')[1]); // Remove the data URL prefix
- } else {
- reject(new Error('Failed to convert Blob to Base64.'));
- }
- };
-
- /**
- * If the reader encounters an error, reject the promise with a proper Error object.
- */
- reader.onerror = (): void => {
- reject(new Error('Failed to read blob as Data URL'));
- };
- reader.readAsDataURL(blob);
- });
- }
}