Skip to content

Commit

Permalink
Change seed phrase termonology, as is confusing, since you can make y…
Browse files Browse the repository at this point in the history
…our own code up
  • Loading branch information
0xGingi committed Dec 29, 2024
1 parent 970481a commit 0a22978
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 19 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ android/app/build
android/build
android/capacitor-cordova-android-plugins/build

browser-extension/web-ext-artifacts
browser-extension/web-ext-artifacts

server/symlink.sh
8 changes: 4 additions & 4 deletions PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TrustyNotes is committed to protecting your privacy. This Privacy Policy explain

### Notes and Content
- All notes and content you create are encrypted end-to-end using AES-GCM encryption
- Encryption keys are derived from your seed phrase, which is never transmitted to our servers
- Encryption keys are derived from your sync code, which is never transmitted to our servers
- Notes are stored locally in your browser and optionally synchronized with our servers in encrypted form
- We cannot access, read, or decrypt your notes as we don't have access to your encryption keys

Expand All @@ -23,7 +23,7 @@ TrustyNotes is committed to protecting your privacy. This Privacy Policy explain
### Data Storage
- Notes are stored locally in your browser's storage
- If sync is enabled, encrypted notes are stored on our servers
- Your seed phrase is stored locally and optionally in the browser extension storage
- Your sync code is stored locally and optionally in the browser extension storage
- We use MongoDB for server-side storage of encrypted data

## Data Security
Expand All @@ -36,7 +36,7 @@ TrustyNotes is committed to protecting your privacy. This Privacy Policy explain
We do not share your data with third parties. Your encrypted notes are only:
- Stored locally on your devices
- Transmitted to our servers for sync purposes (if enabled)
- Accessible only with your seed phrase
- Accessible only with your sync code

## Browser Extension
The TrustyNotes browser extension:
Expand All @@ -51,7 +51,7 @@ You have the right to:
- Delete your notes locally and from our servers
- Choose whether to enable synchronization
- Control which servers you sync with
- Generate new seed phrases
- Generate new sync codes

## Data Retention
- Deleted notes are permanently removed after 24 hours
Expand Down
2 changes: 1 addition & 1 deletion browser-extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async function encryptAndStoreNotes(notes) {
if (!cryptoService) {
const settings = await chrome.storage.local.get(['seed_phrase']);
if (!settings.seed_phrase) {
console.error('No seed phrase set');
console.error('No sync code set');
return;
}
cryptoService = await CryptoService.new(settings.seed_phrase);
Expand Down
2 changes: 1 addition & 1 deletion browser-extension/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ async function initializeCrypto() {
if (!settings.seed_phrase) {
const webAppSettings = await getWebAppSettings();
if (!webAppSettings?.seed_phrase) {
throw new Error('No seed phrase set');
throw new Error('No sync code set');
}
settings = { seed_phrase: webAppSettings.seed_phrase };
}
Expand Down
14 changes: 7 additions & 7 deletions src/components/SyncSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function SyncSettings({ onSync }: SyncSettingsProps) {
if (!seedPhrase) {
notifications.show({
title: 'Error',
message: 'Please enter a seed phrase',
message: 'Please enter a sync code',
color: 'red',
});
return;
Expand Down Expand Up @@ -223,10 +223,10 @@ export function SyncSettings({ onSync }: SyncSettingsProps) {
await saveSettings({ seed_phrase: mnemonic });
setShowNewSeedPhrase(true);
} catch (error) {
console.error('Failed to generate seed phrase:', error);
console.error('Failed to generate sync code:', error);
notifications.show({
title: 'Error',
message: 'Failed to generate seed phrase',
message: 'Failed to generate sync code',
color: 'red',
});
}
Expand Down Expand Up @@ -275,8 +275,8 @@ export function SyncSettings({ onSync }: SyncSettingsProps) {
</Group>

<PasswordInput
label="Seed Phrase"
description="Enter your seed phrase to sync across devices"
label="Sync Code"
description="Enter your sync code to sync across devices! This can be generated automatically or you can enter your own!"
value={seedPhrase}
onChange={(e) => {
setSeedPhrase(e.currentTarget.value);
Expand All @@ -295,7 +295,7 @@ export function SyncSettings({ onSync }: SyncSettingsProps) {
variant="light"
onClick={generateNewSeedPhrase}
>
Generate New Seed Phrase
Generate New Sync Code
</Button>
</Group>

Expand Down Expand Up @@ -364,7 +364,7 @@ export function SyncSettings({ onSync }: SyncSettingsProps) {
<Modal
opened={showNewSeedPhrase}
onClose={() => setShowNewSeedPhrase(false)}
title="Your New Seed Phrase"
title="Your New Sync Code"
>
<Stack>
<Text fw={500} c="red">
Expand Down
6 changes: 3 additions & 3 deletions src/components/SyncSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function SyncSetup({ onSync }: SyncSetupProps) {
if (!seedPhrase) {
notifications.show({
title: 'Error',
message: 'Please enter a seed phrase',
message: 'Please enter a sync code',
color: 'red',
});
return;
Expand Down Expand Up @@ -57,11 +57,11 @@ export function SyncSetup({ onSync }: SyncSetupProps) {

return (
<Stack>
<Text>Enter your seed phrase to sync across devices:</Text>
<Text>Enter your sync code to sync across devices:</Text>
<PasswordInput
value={seedPhrase}
onChange={(e) => setSeedPhrase(e.currentTarget.value)}
placeholder="Enter seed phrase"
placeholder="Enter sync code"
description="This phrase is used to encrypt your notes. Keep it safe!"
/>
<Button
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useAutoSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function useAutoSync(auto_sync: boolean, sync_interval: number) {
isSyncingRef.current = true;
const settings = await WebStorageService.getSyncSettings();
if (!settings.seed_phrase) {
throw new Error('No seed phrase configured');
throw new Error('No sync code configured');
}

const cryptoService = await CryptoService.new(settings.seed_phrase);
Expand Down
2 changes: 1 addition & 1 deletion src/services/cryptoService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class CryptoService {
return words.join(' ');
} catch (error) {
console.error('Failed to generate mnemonic:', error);
throw new Error('Failed to generate seed phrase');
throw new Error('Failed to generate sync code');
}
}

Expand Down

0 comments on commit 0a22978

Please sign in to comment.