Skip to content

Commit a5e5d1c

Browse files
committed
resolve conflict
2 parents 4922311 + 968a6c2 commit a5e5d1c

File tree

108 files changed

+5292
-4616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+5292
-4616
lines changed

.github/workflows/build-and-release-desktop.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Build and Release Desktop
22

33
env:
4-
NETWORK: Shimmer
5-
NETWORK_CODE: shimmer
4+
NETWORK: IOTA
5+
NETWORK_CODE: iota
66

77
on:
88
push:
99
tags:
10-
- desktop-shimmer-*
10+
- desktop-iota-*
1111
workflow_dispatch:
1212
inputs:
1313
debugElectronBuilder:
@@ -39,7 +39,7 @@ jobs:
3939
- id: set_outputs
4040
name: Set outputs for version, release name, and stage
4141
run: |
42-
VERSION=${GITHUB_REF#refs/*/desktop-shimmer-}
42+
VERSION=${GITHUB_REF#refs/*/desktop-iota-}
4343
RELEASE_NAME=$(echo $VERSION | perl -0777 -pe 's/^([0-9]\d*\.[0-9]\d*\.[0-9]\d*)(?:-([a-z]*)-(\d*))?$/$1 \u$2 $3/')
4444
STAGE=$(echo $VERSION | perl -0777 -pe 's/^([0-9]\d*\.[0-9]\d*\.[0-9]\d*)(?:-([a-z]*)-([0-9]\d*(\.[0-9]\d*)*))?$/$2/')
4545
@@ -198,7 +198,7 @@ jobs:
198198
name: firefly-desktop-${{ matrix.os }}
199199
path: |
200200
packages/desktop/out/firefly-*
201-
packages/desktop/out/shimmer*
201+
packages/desktop/out/latest*
202202
203203
release:
204204
runs-on: ubuntu-latest
@@ -315,7 +315,7 @@ jobs:
315315
AWS_DEFAULT_REGION: eu-central-1
316316

317317
- name: Invalidate CloudFront cache for auto-update files
318-
run: aws cloudfront create-invalidation --distribution-id E32G4HRED4PO65 --paths "/shimmer*"
318+
run: aws cloudfront create-invalidation --distribution-id E32G4HRED4PO65 --paths "/latest*"
319319
env:
320320
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
321321
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/build-desktop.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -140,24 +140,24 @@ jobs:
140140
if: matrix.os == 'ubuntu-20.04'
141141

142142
- name: Sign AppImage (Linux)
143-
run: echo $GPG_PASSPHRASE | gpg --pinentry-mode loopback --batch --passphrase-fd 0 --armor --detach-sign --default-key [email protected] firefly-desktop*.AppImage
143+
run: echo $GPG_PASSPHRASE | gpg --pinentry-mode loopback --batch --passphrase-fd 0 --armor --detach-sign --default-key [email protected] firefly-*.AppImage
144144
working-directory: packages/desktop/out
145145
env:
146146
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
147147
if: matrix.os == 'ubuntu-20.04'
148148

149149
- name: Compute checksums (Linux)
150-
run: for i in `ls | grep 'firefly-desktop*'` ; do sha256sum $i | awk {'print $1'} > $i.sha256 ; done
150+
run: for i in `ls | grep 'firefly-*'` ; do sha256sum $i | awk {'print $1'} > $i.sha256 ; done
151151
working-directory: packages/desktop/out
152152
if: matrix.os == 'ubuntu-20.04'
153153

154154
- name: Compute checksums (macOS)
155-
run: for i in `ls | grep 'firefly-desktop*'` ; do shasum -a 256 $i | awk {'print $1'} > $i.sha256 ; done
155+
run: for i in `ls | grep 'firefly-*'` ; do shasum -a 256 $i | awk {'print $1'} > $i.sha256 ; done
156156
working-directory: packages/desktop/out
157157
if: matrix.os == 'macos-11'
158158

159159
- name: Compute checksums (Windows)
160-
run: Get-ChildItem "." -Filter firefly-desktop* | Foreach-Object { $(Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash | Set-Content ($_.FullName + '.sha256') }
160+
run: Get-ChildItem "." -Filter firefly-* | Foreach-Object { $(Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash | Set-Content ($_.FullName + '.sha256') }
161161
working-directory: packages/desktop/out
162162
if: matrix.os == 'windows-2019'
163163

@@ -166,5 +166,5 @@ jobs:
166166
with:
167167
name: firefly-desktop-${{ matrix.os }}
168168
path: |
169-
packages/desktop/out/firefly-desktop*
170-
packages/desktop/out/shimmer*
169+
packages/desktop/out/firefly-*
170+
packages/desktop/out/latest*

.prettierrc.yml

+6
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ singleQuote: true
88
tabWidth: 4
99
trailingComma: es5
1010
useTabs: false
11+
plugins:
12+
- prettier-plugin-svelte
13+
overrides:
14+
- files: '*.svelte'
15+
options:
16+
parser: 'svelte'

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<a href=""><img src="header.png"></a>
44
</h1>
55

6-
<h2 align="center">Firefly Shimmer</h2>
6+
<h2 align="center">Firefly IOTA</h2>
77

88
<p align="center">
99
<a href="https://discord.iota.org/" style="text-decoration:none;"><img src="https://img.shields.io/badge/Discord-9cf.svg?logo=discord" alt="Discord"></a>

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"check-types:shared": "cd packages/shared && tsc --project tsconfig.base.json --pretty --noEmit",
3030
"docs:start": "cd docs/ && retype start",
3131
"format": "yarn format:write",
32-
"format:check": "prettier -c \"**/*.{ts,js,json,scss,css,svelte}\"",
33-
"format:write": "prettier -w \"**/*.{ts,js,json,scss,css,svelte}\"",
32+
"format:check": "prettier --plugin prettier-plugin-svelte -c \"**/*.{ts,js,json,scss,css,svelte}\"",
33+
"format:write": "prettier --plugin prettier-plugin-svelte -w \"**/*.{ts,js,json,scss,css,svelte}\"",
3434
"lint": "yarn lint:fix",
3535
"lint:check": "eslint . --cache",
3636
"lint:fix": "eslint . --cache --fix",

packages/desktop/App.svelte

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<script lang="ts">
22
import { onDestroy, onMount } from 'svelte'
33
import { _, isLocaleLoaded, Locale, localeDirection, setupI18n } from '@core/i18n'
4-
import { activeProfile, checkAndMigrateProfiles, cleanupEmptyProfiles, saveActiveProfile } from '@core/profile'
4+
import {
5+
activeProfile,
6+
checkAndMigrateProfiles,
7+
cleanupEmptyProfiles,
8+
renameOldProfileFoldersToId,
9+
saveActiveProfile,
10+
} from '@core/profile'
511
import {
612
AppRoute,
713
appRoute,
@@ -82,6 +88,10 @@
8288
8389
onMount(async () => {
8490
features.analytics.appStart.enabled && Platform.trackEvent('app-start')
91+
92+
// needed for profiles that come from very old firefly chrysalis
93+
await renameOldProfileFoldersToId()
94+
8595
await cleanupEmptyProfiles()
8696
checkAndMigrateProfiles()
8797

packages/desktop/components/modals/AccountActionsMenu.svelte

+14-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
import { selectedAccount } from '@core/account/stores'
55
import { localize } from '@core/i18n'
6-
import { activeAccounts, isActiveLedgerProfile, visibleActiveAccounts } from '@core/profile/stores'
6+
import { activeAccounts, activeProfile, isActiveLedgerProfile, visibleActiveAccounts } from '@core/profile/stores'
77
import { deleteAccount } from '@core/profile-manager/actions'
88
99
import { Icon } from '@auxiliary/icon/enums'
@@ -12,6 +12,7 @@
1212
import { checkOrConnectLedger } from '@core/ledger'
1313
import { showAppNotification } from '@auxiliary/notification'
1414
import { handleError } from '@core/error/handlers'
15+
import { NetworkId } from '@core/network/enums'
1516
1617
export let modal: Modal = undefined
1718
@@ -28,6 +29,11 @@
2829
modal?.close()
2930
}
3031
32+
function onViewAddressHistoryClick(): void {
33+
openPopup({ id: PopupId.AddressHistory })
34+
modal?.close()
35+
}
36+
3137
function onVerifyAddressClick(): void {
3238
const ADDRESS_INDEX = 0
3339
checkOrConnectLedger(() => {
@@ -66,6 +72,13 @@
6672
<Modal bind:this={modal} {...$$restProps}>
6773
<account-actions-menu class="flex flex-col">
6874
<MenuItem icon={Icon.Doc} title={localize('actions.viewBalanceBreakdown')} onClick={onViewBalanceClick} />
75+
{#if $activeProfile?.network?.id === NetworkId.Iota}
76+
<MenuItem
77+
icon={Icon.Timer}
78+
title={localize('actions.viewAddressHistory')}
79+
onClick={onViewAddressHistoryClick}
80+
/>
81+
{/if}
6982
<MenuItem icon={Icon.Customize} title={localize('actions.customizeAcount')} onClick={onCustomiseAccountClick} />
7083
{#if $isActiveLedgerProfile}
7184
<MenuItem

packages/desktop/components/popups/ActivityDetailsPopup.svelte

+26-21
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
<script lang="ts">
2+
import { PopupId, closePopup, openPopup } from '@auxiliary/popup'
3+
import { openUrlInBrowser } from '@core/app'
24
import { localize } from '@core/i18n'
5+
import { ExplorerEndpoint } from '@core/network'
36
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'
189
import {
1910
ActivityAsyncStatus,
2011
ActivityDirection,
@@ -23,13 +14,21 @@
2314
rejectActivity,
2415
selectedAccountActivities,
2516
} 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'
3230
import { TextHintVariant } from 'shared/components/enums'
31+
import { onMount } from 'svelte'
3332
3433
export let activityId: string
3534
export let _onMount: (..._: any[]) => Promise<void> = async () => {}
@@ -45,7 +44,13 @@
4544
activity?.asyncData?.asyncStatus === ActivityAsyncStatus.Unclaimed
4645
4746
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)
4954
}
5055
5156
function onTransactionIdClick(): void {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<script lang="ts">
2+
import { getSelectedAccount } from '@core/account'
3+
import { localize } from '@core/i18n'
4+
import { truncateString } from '@core/utils'
5+
import { AccountAddress } from '@iota/sdk/out/types'
6+
import VirtualList from '@sveltejs/svelte-virtual-list'
7+
import { FontWeight, KeyValueBox, Spinner, Text, TextType } from 'shared/components'
8+
import { onMount } from 'svelte'
9+
10+
let addressList: AccountAddress[] | undefined = undefined
11+
12+
onMount(() => {
13+
getSelectedAccount()
14+
?.addresses()
15+
.then((_addressList) => {
16+
addressList = _addressList?.sort((a, b) => a.keyIndex - b.keyIndex) ?? []
17+
})
18+
.catch((err) => {
19+
console.error(err)
20+
addressList = []
21+
})
22+
})
23+
</script>
24+
25+
<div class="flex flex-col space-y-6">
26+
<Text type={TextType.h3} fontWeight={FontWeight.semibold} lineHeight="6">
27+
{localize('popups.addressHistory.title')}
28+
</Text>
29+
<Text fontSize="15" color="gray-700" classes="text-left">{localize('popups.addressHistory.disclaimer')}</Text>
30+
{#if addressList}
31+
{#if addressList.length > 0}
32+
<div class="w-full flex-col space-y-2 virtual-list-wrapper">
33+
<VirtualList items={addressList} let:item>
34+
<div class="mb-1">
35+
<KeyValueBox
36+
isCopyable
37+
classes="flex items-center w-full py-4"
38+
keyText={truncateString(item?.address, 15, 15)}
39+
valueText={localize('popups.addressHistory.indexAndType', {
40+
values: {
41+
index: item.keyIndex,
42+
internal: item.internal,
43+
},
44+
})}
45+
copyValue={item.address}
46+
backgroundColor="gray-50"
47+
darkBackgroundColor="gray-900"
48+
/>
49+
</div>
50+
</VirtualList>
51+
</div>
52+
{:else}
53+
<Text secondary classes="text-center">-</Text>
54+
{/if}
55+
{:else}
56+
<div class="flex items-center justify-center">
57+
<Spinner />
58+
</div>
59+
{/if}
60+
</div>
61+
62+
<style lang="scss">
63+
.virtual-list-wrapper :global(svelte-virtual-list-viewport) {
64+
margin-right: -1rem !important;
65+
flex: auto;
66+
overflow-y: scroll;
67+
padding-right: 1.5rem !important;
68+
min-height: 52px;
69+
max-height: 300px;
70+
}
71+
72+
.virtual-list-wrapper :global(svelte-virtual-list-contents) {
73+
margin-right: -1rem !important;
74+
}
75+
</style>

packages/desktop/components/popups/LedgerAppGuidePopup.svelte

+16-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
import { LedgerAppName, ledgerAppName } from '@core/ledger'
55
import { localize } from '@core/i18n'
66
import { IllustrationEnum } from '@auxiliary/illustration'
7+
import { Icon } from '@auxiliary/icon'
78
89
let stepIndex = 0
9-
const stepAnimations = [
10+
const stepIlustrations = [
1011
IllustrationEnum.LedgerLiveUpdatedDesktop,
1112
IllustrationEnum.LedgerConnected2Desktop,
1213
$ledgerAppName === LedgerAppName.Shimmer
@@ -16,6 +17,14 @@
1617
IllustrationEnum.LedgerCloseLiveDesktop,
1718
]
1819
20+
const stepIconWithIlustrations = [
21+
undefined,
22+
undefined,
23+
undefined,
24+
$ledgerAppName === LedgerAppName.Shimmer ? Icon.Shimmer : Icon.Iota,
25+
undefined,
26+
]
27+
1928
function changeIndex(increment: number): void {
2029
stepIndex += increment
2130
}
@@ -29,7 +38,12 @@
2938
{localize('popups.ledgerAppGuide.title', { values: { legacy: $ledgerAppName } })}
3039
</Text>
3140
<div class="w-full flex flex-row flex-wrap">
32-
<LedgerAnimation illustration={stepAnimations[stepIndex]} classes="illustration-wrapper" bgClasses="top-6" />
41+
<LedgerAnimation
42+
illustration={stepIlustrations[stepIndex]}
43+
iconNetwork={stepIconWithIlustrations[stepIndex]}
44+
classes="illustration-wrapper"
45+
bgClasses="top-6"
46+
/>
3347
<div class="w-full text-center my-9 px-10">
3448
<Text secondary>
3549
{localize(`popups.ledgerAppGuide.steps.${stepIndex}`, { values: { legacy: $ledgerAppName } })}

0 commit comments

Comments
 (0)