+ {/* Aspect ratio picker */}
+
+
+ {/* Hide amount toggle */}
+
+ {/* Copy image */}
+
+
+ {/* Download */}
- {/* Capturable Area */}
+ {/* ── Capturable receipt card ── */}
+ {/* Header — issuer branding */}
- {issuerLogoUrl &&

}
+ {issuerLogoUrl && (
+

+ )}
{issuerName}
+ {/* Amount section */}
Amount
{hideAmount ? (
-
••••••
+ <>
+
••••••
+
Hidden for privacy
+ >
) : (
-
{amount} {currency}
+
+ {typeof amount === 'number' ? amount.toLocaleString() : amount} {currency}
+
)}
+ {/* Detail rows */}
Status
- {status.toUpperCase()}
+
+ {status.toUpperCase()}
+
Date
@@ -168,39 +392,63 @@ export const TransactionReceiptShare: React.FC = (
{transactionHash && (
- Transaction Hash
- {transactionHash}
+ Hash
+ {transactionHash}
+
+ )}
+ {memo && (
+
+ Memo
+ {memo}
)}
-
-
From
-
{senderWallet}
+ {/* Sensitive: sender wallet (copy disabled) */}
+
+
+ From
+
+
+
+
+
+ {senderWallet}
+
-
-
To
-
{recipientWallet}
+ {/* Sensitive: recipient wallet (copy disabled) */}
+
+
+ To
+
+
+
+
+
+ {recipientWallet}
+
+
+ {/* Footer */}
Generated securely by {issuerName}
-
{explorerUrl && (
-
+
)}
-
{transactionHash && (
-
- Hash: {transactionHash}
-
+
Hash: {transactionHash}
)}
@@ -208,4 +456,5 @@ export const TransactionReceiptShare: React.FC
= (
);
};
+TransactionReceiptShare.displayName = 'TransactionReceiptShare';
export default TransactionReceiptShare;
diff --git a/src/components/StatusTimeline/__snapshots__/TransactionReceiptShare.test.tsx.snap b/src/components/StatusTimeline/__snapshots__/TransactionReceiptShare.test.tsx.snap
index 2e989ce..ad4eb07 100644
--- a/src/components/StatusTimeline/__snapshots__/TransactionReceiptShare.test.tsx.snap
+++ b/src/components/StatusTimeline/__snapshots__/TransactionReceiptShare.test.tsx.snap
@@ -1,52 +1,2510 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`TransactionReceiptShare > renders correctly and matches snapshot 1`] = `
+exports[`TransactionReceiptShare > rendering > matches snapshot for compact layout 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+ Amount
+
+
+
+ 1,500.00
+
+ USDC
+
+
+
+
+
+
+ Status
+
+
+ COMPLETED
+
+
+
+
+ Date
+
+
+ Oct 24, 2023 14:30
+
+
+
+
+ Transaction ID
+
+
+ TX-12345
+
+
+
+
+ From
+
+
+
+
+
+ 0x1234567890abcdef1234567890abcdef12345678
+
+
+
+
+ To
+
+
+
+
+
+ 0xabcdef1234567890abcdef1234567890abcdef12
+
+
+
+
+
+
+
+`;
+
+exports[`TransactionReceiptShare > snapshots > all optional fields 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Amount
+
+
+
+ 1,500.00
+
+ USDC
+
+
+
+
+
+
+ Status
+
+
+ COMPLETED
+
+
+
+
+ Date
+
+
+ Oct 24, 2023 14:30
+
+
+
+
+ Transaction ID
+
+
+ TX-12345
+
+
+
+
+ Hash
+
+
+ 0xabcdef
+
+
+
+
+ Memo
+
+
+ Payment for invoice #42
+
+
+
+
+ From
+
+
+
+
+
+ 0x1234567890abcdef1234567890abcdef12345678
+
+
+
+
+ To
+
+
+
+
+
+ 0xabcdef1234567890abcdef1234567890abcdef12
+
+
+
+
+
+
+
+`;
+
+exports[`TransactionReceiptShare > snapshots > compact layout 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Amount
+
+
+
+ 1,500.00
+
+ USDC
+
+
+
+
+
+
+ Status
+
+
+ COMPLETED
+
+
+
+
+ Date
+
+
+ Oct 24, 2023 14:30
+
+
+
+
+ Transaction ID
+
+
+ TX-12345
+
+
+
+
+ From
+
+
+
+
+
+ 0x1234567890abcdef1234567890abcdef12345678
+
+
+
+
+ To
+
+
+
+
+
+ 0xabcdef1234567890abcdef1234567890abcdef12
+
+
+
+
+
+
+
+`;
+
+exports[`TransactionReceiptShare > snapshots > hidden amount 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Amount
+
+
+
+ ••••••
+
+
+ Hidden for privacy
+
+
+
+
+
+
+ Status
+
+
+ COMPLETED
+
+
+
+
+ Date
+
+
+ Oct 24, 2023 14:30
+
+
+
+
+ Transaction ID
+
+
+ TX-12345
+
+
+
+
+ From
+
+
+
+
+
+ 0x1234567890abcdef1234567890abcdef12345678
+
+
+
+
+ To
+
+
+
+
+
+ 0xabcdef1234567890abcdef1234567890abcdef12
+
+
+
+
+
+
+
+`;
+
+exports[`TransactionReceiptShare > snapshots > square layout 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+ Amount
+
+
+
+ 1,500.00
+
+ USDC
+
+
+
+
+
+
+ Status
+
+
+ COMPLETED
+
+
+
+
+ Date
+
+
+ Oct 24, 2023 14:30
+
+
+
+
+ Transaction ID
+
+
+ TX-12345
+
+
+
+
+ From
+
+
+
+
+
+ 0x1234567890abcdef1234567890abcdef12345678
+
+
+
+
+ To
+
+
+
+
+
+ 0xabcdef1234567890abcdef1234567890abcdef12
+
+
+
+
+
+
+
+`;
+
+exports[`TransactionReceiptShare > snapshots > wide layout 1`] = `
+
+
+
+
+
+
From
+
+
+
- 0x123...abc
+ 0x1234567890abcdef1234567890abcdef12345678
To
+
+
+
- 0x456...def
+ 0xabcdef1234567890abcdef1234567890abcdef12
diff --git a/vite.config.ts b/vite.config.ts
index 18cf275..aa05bd5 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -43,6 +43,8 @@ export default defineConfig({
'src/components/DocumentUploader/DocumentUploader.tsx',
// Issue #472 – Governance vote receipt
'src/components/GovernanceVoteReceipt/GovernanceVoteReceipt.tsx',
+ // Issue #481 – Transaction receipt share-as-image
+ 'src/components/StatusTimeline/TransactionReceiptShare.tsx',
// Command Palette
'src/components/CommandPalette/CommandPalette.tsx',
'src/components/CommandPalette/commandPaletteData.ts',
@@ -158,6 +160,9 @@ export default defineConfig({
'src/components/Notifications/NotificationBell.tsx': {
branches: 95, functions: 95, lines: 95, statements: 95,
},
+ 'src/components/StatusTimeline/TransactionReceiptShare.tsx': {
+ branches: 95, functions: 95, lines: 95, statements: 95,
+ },
}
}
}