Skip to content

Commit

Permalink
Only allow setting metadata copy if RequestLog exists at selected index
Browse files Browse the repository at this point in the history
  • Loading branch information
asoong committed May 9, 2024
1 parent 2acb8dc commit 42c5f80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Notary/NotarizationTable.tsx
Expand Up @@ -188,7 +188,7 @@ export const NotarizationTable: React.FC<NotarizationTableProps> = ({
};

const detectedNotarizationCopy = useMemo(() => {
if (selectedIndex !== null) {
if (selectedIndex !== null && loadedNotaryProofs[selectedIndex]) {
const selectedRequest: ExtensionNotaryProofRow = loadedNotaryProofs[selectedIndex];

switch (circuitType) {
Expand All @@ -203,7 +203,7 @@ export const NotarizationTable: React.FC<NotarizationTableProps> = ({
case NotaryVerificationCircuit.TRANSFER:
return {
detected_copy: 'The following transaction was detected from your Revolut account history',
metadata_copy: `€${selectedRequest.metadata} EUR on ${selectedRequest.date}`, // fix this from on to at
metadata_copy: `€${selectedRequest.metadata} EUR on ${selectedRequest.date}`,
metadata_type_copy: 'transaction',
transaction_type_copy: 'order'
};
Expand Down

0 comments on commit 42c5f80

Please sign in to comment.