(false);
@@ -40,14 +42,15 @@ export const Messages = () => {
const messages = useMemo(() => {
if (!data?.wallets.find_one.contacts.find_one.messages.length) return [];
- if (unecryptedMessage.length) return unecryptedMessage;
+ if (decryptedMessage.length) return decryptedMessage;
return data.wallets.find_one.contacts.find_one.messages.map(m => ({
id: m.id,
contact_is_sender: m.contact_is_sender,
message: m.payload,
+ created_at: m.created_at,
}));
- }, [unecryptedMessage, data]);
+ }, [decryptedMessage, data]);
useEffect(() => {
if (!masterKey) return;
@@ -82,7 +85,7 @@ export const Messages = () => {
switch (message.type) {
case 'decryptMessages':
- setUnencryptedMessage(message.payload);
+ setDecryptedMessage(message.payload);
break;
case 'loaded':
@@ -123,6 +126,9 @@ export const Messages = () => {
{m.message.substring(0, 1) === '{'
? 'Encrypted message'
: m.message}
+
+ {format(new Date(m.created_at), 'yyyy.MM.dd - HH:mm')}
+
))}
diff --git a/src/views/wallet/Settings.tsx b/src/views/wallet/Settings.tsx
index 72ae158f..d2487fe8 100644
--- a/src/views/wallet/Settings.tsx
+++ b/src/views/wallet/Settings.tsx
@@ -147,13 +147,13 @@ export const WalletSettings: FC<{ walletId: string }> = ({ walletId }) => {
disabled={loading || !!mnemonic || !masterKey}
onClick={() => handleDecrypt()}
>
- Unencrypt
+ Decrypt
-
+