|
1 | 1 | <script lang="ts">
|
| 2 | + import { PopupId, closePopup, openPopup } from '@auxiliary/popup' |
| 3 | + import { openUrlInBrowser } from '@core/app' |
2 | 4 | import { localize } from '@core/i18n'
|
| 5 | + import { ExplorerEndpoint } from '@core/network' |
3 | 6 | import { getOfficialExplorerUrl } from '@core/network/utils'
|
4 |
| - import { |
5 |
| - Text, |
6 |
| - Button, |
7 |
| - FontWeight, |
8 |
| - TextType, |
9 |
| - BasicActivityDetails, |
10 |
| - AliasActivityDetails, |
11 |
| - FoundryActivityDetails, |
12 |
| - GovernanceActivityDetails, |
13 |
| - NftActivityDetails, |
14 |
| - ConsolidationActivityDetails, |
15 |
| - ActivityInformation, |
16 |
| - } from 'shared/components' |
17 |
| - import { openUrlInBrowser } from '@core/app' |
| 7 | + import { activeProfile, checkActiveProfileAuth } from '@core/profile' |
| 8 | + import { setClipboard, truncateString } from '@core/utils' |
18 | 9 | import {
|
19 | 10 | ActivityAsyncStatus,
|
20 | 11 | ActivityDirection,
|
|
23 | 14 | rejectActivity,
|
24 | 15 | selectedAccountActivities,
|
25 | 16 | } from '@core/wallet'
|
26 |
| - import { activeProfile, checkActiveProfileAuth } from '@core/profile' |
27 |
| - import { setClipboard } from '@core/utils' |
28 |
| - import { truncateString } from '@core/utils' |
29 |
| - import { closePopup, openPopup, PopupId } from '@auxiliary/popup' |
30 |
| - import { onMount } from 'svelte' |
31 |
| - import { ExplorerEndpoint } from '@core/network' |
| 17 | + import { |
| 18 | + ActivityInformation, |
| 19 | + AliasActivityDetails, |
| 20 | + BasicActivityDetails, |
| 21 | + Button, |
| 22 | + ConsolidationActivityDetails, |
| 23 | + FontWeight, |
| 24 | + FoundryActivityDetails, |
| 25 | + GovernanceActivityDetails, |
| 26 | + NftActivityDetails, |
| 27 | + Text, |
| 28 | + TextType, |
| 29 | + } from 'shared/components' |
32 | 30 | import { TextHintVariant } from 'shared/components/enums'
|
| 31 | + import { onMount } from 'svelte' |
33 | 32 |
|
34 | 33 | export let activityId: string
|
35 | 34 | export let _onMount: (..._: any[]) => Promise<void> = async () => {}
|
|
45 | 44 | activity?.asyncData?.asyncStatus === ActivityAsyncStatus.Unclaimed
|
46 | 45 |
|
47 | 46 | function onExplorerClick(): void {
|
48 |
| - openUrlInBrowser(`${explorerUrl}/${ExplorerEndpoint.Transaction}/${activity?.transactionId}`) |
| 47 | + let url: string |
| 48 | + if (activity?.type === ActivityType.Vesting) { |
| 49 | + url = `${explorerUrl}/${ExplorerEndpoint.Output}/${activity?.outputId}` |
| 50 | + } else { |
| 51 | + url = `${explorerUrl}/${ExplorerEndpoint.Transaction}/${activity?.transactionId}` |
| 52 | + } |
| 53 | + openUrlInBrowser(url) |
49 | 54 | }
|
50 | 55 |
|
51 | 56 | function onTransactionIdClick(): void {
|
|
0 commit comments