@@ -139,26 +139,30 @@ export default function DetailView() {
Destination transaction hash:
{transfer?.execution && transfer?.execution?.txHash}
- {
- void navigator.clipboard?.writeText(transfer?.execution?.txHash!)
- dispatcher({
- type: "set_clipboard_message_t2",
- payload: "Copied to clipboard!",
- })
- }}
- >
-
-
-
-
+ {transfer?.execution ? (
+ {
+ void navigator.clipboard?.writeText(transfer?.execution?.txHash!)
+ dispatcher({
+ type: "set_clipboard_message_t2",
+ payload: "Copied to clipboard!",
+ })
+ }}
+ >
+
+
+
+
+ ) : (
+ Pending proposal execution
+ )}
diff --git a/src/utils/Helpers.tsx b/src/utils/Helpers.tsx
index 1310836..1871285 100644
--- a/src/utils/Helpers.tsx
+++ b/src/utils/Helpers.tsx
@@ -306,12 +306,12 @@ export const renderFormatedConvertedAmount = (type: ResourceTypes, usdValue: num
return ""
}
-export const txHashLinks = (type: DomainTypes, txHash: string, domainExplorerUrl: string): string => {
+export const txHashLinks = (type: DomainTypes, domainExplorerUrl: string, txHash?: string): string => {
switch (type) {
case DomainTypes.EVM:
return `${domainExplorerUrl}/tx/${txHash}`
case DomainTypes.SUBSTRATE:
- return `${domainExplorerUrl}/${txHash.split("-")[0]}`
+ return `${domainExplorerUrl}/${txHash?.split("-")[0] || ""}`
default:
return ""
}