@@ -47,7 +47,7 @@
)
: (
} className="nyi">
- {t("address.buttonAddFriend")}
+ {t("address.buttonAddContact")}
)}
>;
diff --git a/src/pages/addresses/AddressPage.tsx b/src/pages/addresses/AddressPage.tsx
index 3ae3936..5bb1cbd 100644
--- a/src/pages/addresses/AddressPage.tsx
+++ b/src/pages/addresses/AddressPage.tsx
@@ -52,7 +52,7 @@
{address.address}
- {/* Buttons (e.g. Send Krist, Add friend) */}
+ {/* Buttons (e.g. Send Krist, Add contact) */}
diff --git a/src/pages/backup/BackupResultsSummary.tsx b/src/pages/backup/BackupResultsSummary.tsx
index 17813fb..dff7150 100644
--- a/src/pages/backup/BackupResultsSummary.tsx
+++ b/src/pages/backup/BackupResultsSummary.tsx
@@ -16,7 +16,7 @@
export function BackupResultsSummary({ results }: { results: BackupResults }): JSX.Element {
const { t } = useTranslation();
- // TODO: do this for friends too
+ // TODO: do this for contacts too
const { newWallets, skippedWallets } = results;
const warningCount = Object.values(results.messages.wallets)
.reduce((acc, msgs) => acc + msgs.filter(m => m.type === "warning").length, 0);
@@ -45,7 +45,7 @@
}
- {/* TODO: Show friend counts too (only if >0) */}
+ {/* TODO: Show contact counts too (only if >0) */}
{/* Errors/warnings */}
diff --git a/src/pages/backup/BackupResultsTree.tsx b/src/pages/backup/BackupResultsTree.tsx
index 68aa0af..435d9c3 100644
--- a/src/pages/backup/BackupResultsTree.tsx
+++ b/src/pages/backup/BackupResultsTree.tsx
@@ -66,7 +66,7 @@
}
/** Converts the backup results into a tree of messages, grouped by wallet
- * and friend UUID. */
+ * and contact UUID. */
function getTreeData(
t: TFunction, i18n: i18n,
results: BackupResults
@@ -102,7 +102,7 @@
});
}
- // TODO: Add the friends data
+ // TODO: Add the address book contacts data
return out;
}
diff --git a/src/pages/backup/backupExport.ts b/src/pages/backup/backupExport.ts
index 16454fd..676ca01 100644
--- a/src/pages/backup/backupExport.ts
+++ b/src/pages/backup/backupExport.ts
@@ -18,7 +18,7 @@
salt, tester,
wallets: finalWallets,
- friends: {} // TODO
+ contacts: {} // TODO
};
// Convert to base64'd JSON
diff --git a/src/pages/backup/backupFormats.ts b/src/pages/backup/backupFormats.ts
index 950d4e4..763573c 100644
--- a/src/pages/backup/backupFormats.ts
+++ b/src/pages/backup/backupFormats.ts
@@ -57,7 +57,7 @@
version: 2;
wallets: Record;
- // friends: Record;
+ // contacts: Record;
}
export const isBackupKristWebV2 = (backup: Backup): backup is BackupKristWebV2 =>
backup.type === BackupFormatType.KRISTWEB_V2;
diff --git a/src/pages/backup/backupParser.ts b/src/pages/backup/backupParser.ts
index 43bfc64..538be7c 100644
--- a/src/pages/backup/backupParser.ts
+++ b/src/pages/backup/backupParser.ts
@@ -32,6 +32,8 @@
throw new TranslatedError("import.decodeErrors.invalidWallets");
if (data.friends !== undefined && !isPlainObject(data.friends))
throw new TranslatedError("import.decodeErrors.invalidFriends");
+ if (data.contacts !== undefined && !isPlainObject(data.contacts))
+ throw new TranslatedError("import.decodeErrors.invalidContacts");
// Determine the format
if (data.version === 2) {
diff --git a/src/pages/backup/backupResults.ts b/src/pages/backup/backupResults.ts
index 35229fd..08c90e5 100644
--- a/src/pages/backup/backupResults.ts
+++ b/src/pages/backup/backupResults.ts
@@ -14,7 +14,7 @@
args?: Record;
}
-export type MessageSource = "wallets" | "friends";
+export type MessageSource = "wallets" | "contacts";
export type MessageType = React.ReactNode | TranslatedMessage | string;
export type ResultType = "success" | "warning" | "error";
@@ -30,14 +30,14 @@
* date). */
public importedWallets: Wallet[] = [];
- /** For both wallets and friends, a map of wallet/friend UUIDs containing
+ /** For both wallets and contacts, a map of wallet/contact UUIDs containing
* all the messages (success, warning, error). */
public messages: {
wallets: Record;
- friends: Record;
+ contacts: Record;
} = {
wallets: {},
- friends: {}
+ contacts: {}
};
/** Adds a message to the appropriate message map. */
@@ -49,19 +49,19 @@
else msgMap[uuid].push(message);
}
- /** Logs a success message for the given wallet/friend UUID to the appropriate
- * message map. */
+ /** Logs a success message for the given wallet/contact UUID to the
+ * appropriate message map. */
public addSuccessMessage(src: MessageSource, uuid: string, message: MessageType): void {
this.addMessage(src, uuid, { type: "success", message });
}
- /** Logs a warning message for the given wallet/friend UUID to the appropriate
- * message map. */
+ /** Logs a warning message for the given wallet/contact UUID to the
+ * appropriate message map. */
public addWarningMessage(src: MessageSource, uuid: string, message: MessageType): void {
this.addMessage(src, uuid, { type: "warning", message });
}
- /** Logs an error message for the given wallet/friend UUID to the appropriate
+ /** Logs an error message for the given wallet/contact UUID to the appropriate
* message map. */
public addErrorMessage(src: MessageSource, uuid: string, message?: MessageType, error?: Error): void {
this.addMessage(src, uuid, { type: "error", message, error });