diff --git a/packages/desktop/components/popups/MintNftConfirmationPopup.svelte b/packages/desktop/components/popups/MintNftConfirmationPopup.svelte index a8d23ac6f3..d28757be7e 100644 --- a/packages/desktop/components/popups/MintNftConfirmationPopup.svelte +++ b/packages/desktop/components/popups/MintNftConfirmationPopup.svelte @@ -119,7 +119,7 @@ }, { key: localize('general.immutableIssuer'), - value: $selectedAccount.depositAddress, + value: $selectedAccount?.depositAddress, }, ]} /> diff --git a/packages/shared/src/components/molecules/activity-info/ConsolidationActivityInformation.svelte b/packages/shared/src/components/molecules/activity-info/ConsolidationActivityInformation.svelte index 95ea9d7f75..4a6ff2d237 100644 --- a/packages/shared/src/components/molecules/activity-info/ConsolidationActivityInformation.svelte +++ b/packages/shared/src/components/molecules/activity-info/ConsolidationActivityInformation.svelte @@ -10,11 +10,11 @@ items={[ { key: localize('general.transactionTime'), - value: activity.time ? getFormattedTimeStamp(activity.time) : undefined, + value: activity?.time ? getFormattedTimeStamp(activity?.time) : undefined, }, { key: localize('general.amountConsolidatedInputs'), - value: activity.amountConsolidatedInputs ? String(activity.amountConsolidatedInputs) : undefined, + value: activity?.amountConsolidatedInputs ? String(activity?.amountConsolidatedInputs) : undefined, }, ]} /> diff --git a/packages/shared/src/components/molecules/activity-info/GenericActivityInformation.svelte b/packages/shared/src/components/molecules/activity-info/GenericActivityInformation.svelte index 10605a468a..0f1e59f728 100644 --- a/packages/shared/src/components/molecules/activity-info/GenericActivityInformation.svelte +++ b/packages/shared/src/components/molecules/activity-info/GenericActivityInformation.svelte @@ -8,17 +8,17 @@ export let activity: Activity - $: expirationTime = getFormattedTimeStamp(activity.asyncData?.expirationDate) - $: claimedTime = getFormattedTimeStamp(activity.asyncData?.claimedDate) + $: expirationTime = getFormattedTimeStamp(activity?.asyncData?.expirationDate) + $: claimedTime = getFormattedTimeStamp(activity?.asyncData?.claimedDate) $: hasStorageDeposit = - activity.storageDeposit || (activity.storageDeposit === 0 && activity.giftedStorageDeposit === 0) - $: gasLimit = activity.parsedLayer2Metadata?.gasLimit + activity?.storageDeposit || (activity?.storageDeposit === 0 && activity?.giftedStorageDeposit === 0) + $: gasLimit = activity?.parsedLayer2Metadata?.gasLimit - $: formattedTransactionTime = getFormattedTimeStamp(activity.time) - $: formattedTimelockDate = getFormattedTimeStamp(activity.asyncData?.timelockDate) - $: formattedStorageDeposit = formatTokenAmountPrecise(activity.storageDeposit ?? 0, getBaseToken()) - $: formattedGiftedStorageDeposit = formatTokenAmountPrecise(activity.giftedStorageDeposit ?? 0, getBaseToken()) - $: formattedSurplus = formatTokenAmountPrecise(activity.surplus ?? 0, getBaseToken()) + $: formattedTransactionTime = getFormattedTimeStamp(activity?.time) + $: formattedTimelockDate = getFormattedTimeStamp(activity?.asyncData?.timelockDate) + $: formattedStorageDeposit = formatTokenAmountPrecise(activity?.storageDeposit ?? 0, getBaseToken()) + $: formattedGiftedStorageDeposit = formatTokenAmountPrecise(activity?.giftedStorageDeposit ?? 0, getBaseToken()) + $: formattedSurplus = formatTokenAmountPrecise(activity?.surplus ?? 0, getBaseToken()) $: formattedGasLimit = formatTokenAmountPrecise(Number(gasLimit ?? 0), getBaseToken()) @@ -34,50 +34,50 @@ }, { key: localize('general.tag'), - value: activity.tag, - tooltip: localize(`tooltips.transactionDetails.${activity.direction}.tag`), + value: activity?.tag, + tooltip: localize(`tooltips.transactionDetails.${activity?.direction}.tag`), }, { key: localize('general.metadata'), - value: activity.metadata, - tooltip: localize(`tooltips.transactionDetails.${activity.direction}.metadata`), + value: activity?.metadata, + tooltip: localize(`tooltips.transactionDetails.${activity?.direction}.metadata`), }, { key: localize('general.storageDeposit'), value: hasStorageDeposit ? formattedStorageDeposit : undefined, - tooltip: localize(`tooltips.transactionDetails.${activity.direction}.storageDeposit`), + tooltip: localize(`tooltips.transactionDetails.${activity?.direction}.storageDeposit`), }, { key: localize('general.surplus'), - value: activity.surplus ? formattedSurplus : undefined, + value: activity?.surplus ? formattedSurplus : undefined, }, { key: localize('general.giftedStorageDeposit'), - value: activity.giftedStorageDeposit ? formattedGiftedStorageDeposit : undefined, - tooltip: localize(`tooltips.transactionDetails.${activity.direction}.giftedStorageDeposit`), + value: activity?.giftedStorageDeposit ? formattedGiftedStorageDeposit : undefined, + tooltip: localize(`tooltips.transactionDetails.${activity?.direction}.giftedStorageDeposit`), }, { key: localize('general.gasLimit'), value: gasLimit ? formattedGasLimit : undefined, - tooltip: localize(`tooltips.transactionDetails.${activity.direction}.gasLimit`), + tooltip: localize(`tooltips.transactionDetails.${activity?.direction}.gasLimit`), }, { key: localize('general.expirationTime'), value: expirationTime, - tooltip: localize(`tooltips.transactionDetails.${activity.direction}.expirationTime`), + tooltip: localize(`tooltips.transactionDetails.${activity?.direction}.expirationTime`), }, { key: localize('general.timelockDate'), - value: activity.asyncData?.timelockDate ? formattedTimelockDate : undefined, - tooltip: localize(`tooltips.transactionDetails.${activity.direction}.timelockDate`), + value: activity?.asyncData?.timelockDate ? formattedTimelockDate : undefined, + tooltip: localize(`tooltips.transactionDetails.${activity?.direction}.timelockDate`), }, { key: localize('general.claimedTime'), value: claimedTime, }, { - key: localize(activity.asyncData?.isClaiming ? 'general.claimingIn' : 'general.claimedIn'), - value: activity.asyncData?.claimingTransactionId, + key: localize(activity?.asyncData?.isClaiming ? 'general.claimingIn' : 'general.claimedIn'), + value: activity?.asyncData?.claimingTransactionId, copyable: true, truncate: { firstCharCount: 12, endCharCount: 12 }, }, diff --git a/packages/shared/src/components/molecules/activity-info/GovernanceActivityInformation.svelte b/packages/shared/src/components/molecules/activity-info/GovernanceActivityInformation.svelte index 9cbf4ad4ce..686affb6d4 100644 --- a/packages/shared/src/components/molecules/activity-info/GovernanceActivityInformation.svelte +++ b/packages/shared/src/components/molecules/activity-info/GovernanceActivityInformation.svelte @@ -7,23 +7,23 @@ export let activity: GovernanceActivity - $: formattedTransactionTime = getFormattedTimeStamp(activity.time) + $: formattedTransactionTime = getFormattedTimeStamp(activity?.time) $: isNewVotingPower = - activity.governanceAction === GovernanceAction.DecreaseVotingPower || - activity.governanceAction === GovernanceAction.IncreaseVotingPower + activity?.governanceAction === GovernanceAction.DecreaseVotingPower || + activity?.governanceAction === GovernanceAction.IncreaseVotingPower