-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set & persist explicit account created from the implicit flow a…
…s the selected one (#7923) * refactor(2.0): Dynamic password * refactor(2.0): Remove Profile Manager (wip) * clean up and fix * clean up * clean up more code * feat: add account to routes * feat: add to analytics featureflag * feat: add account view and multistep * style: refinements * feat: rename files and add locale * feat: prepare UI step 1 * feat: add locales * fix: update naming * feat: update naming and improve code * fix: move comment * fix import * feat: hook logic * clean up * adapt and remove for profile-manager related code * clean up more code * fmt * fix: remove accountImplicit route and add to wallet tab * fix: improve naming * Update packages/desktop/views/dashboard/wallet/Wallet.svelte * Update packages/desktop/views/dashboard/wallet/Wallet.svelte * more cleanup * fix: add router * minor fixes * more cleanup * ix: add missing dots * fix: colors * fix: remove unnecessary function * fix: rename files * fix: move if/else and key block * fix: reset after finish * small tweaks * fix: undo changes * feat: use implicitAccountCreationAddress * fix: rename and remove onmount * more cleanup * format * update * clean up * feat: hook logic, first steps * fix: add todo * https://api.testnet.shimmer.network * revert Wallet.svelte * clean up * feat: hook logic in implicit account creation step 3 * clean up * clean up * feat: update logic to go next route * fix: update logic * feat: remove getNftByIdFromAllAccountNfts debris * feat: hook implicit account logic step3 done * feat: create store and persist mainAccountId * fix: use selectedWalletId * fix: problem with the merge * fix: avoid reactive error * fix: update types, move function and fix store * fix: improvements * fix: update logic * fix: update depositAddress * fix: update updateMainAccountId function * fix: add getBlockIssuerAccounts and hasBlockIssuerFeature utils * fix: update store and conditions * fix: rename stores * fix: remove comment * fix: add condition * fix: update deposit address * fix: add comments and move logic to login * fix: remove code from login and update depositAddress * feat: update wallet * feat: remove debris * feat: update handleNewOutputEvent * fix: improve getDepositAddress * feat: fix account output events related to mainAccount * chore: cleanup * chore: update build wallet to set first or unset if not owned * fix: crashes * fix: missing account output check * fix: login removing mainAccount --------- Co-authored-by: marc2332 <mespinsanz@gmail.com> Co-authored-by: Begoña Álvarez de la Cruz <balvarez@boxfish.studio> Co-authored-by: cpl121 <cpeon@boxfish.studio>
- Loading branch information
1 parent
ec29877
commit fdff814
Showing
18 changed files
with
164 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/shared/lib/core/wallet/stores/selected-wallet-main-account-id.store.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { derived } from 'svelte/store' | ||
import { selectedWallet } from './selected-wallet.store' | ||
|
||
export const selectedWalletMainAccountId = derived( | ||
selectedWallet, | ||
($selectedWallet) => $selectedWallet?.mainAccountId ?? null | ||
) |
12 changes: 12 additions & 0 deletions
12
packages/shared/lib/core/wallet/stores/selected-wallet-main-account.store.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { derived, Readable } from 'svelte/store' | ||
import { selectedWalletMainAccountId } from './selected-wallet-main-account-id.store' | ||
import { selectedWallet } from './selected-wallet.store' | ||
import { AccountOutput, OutputData } from '@iota/sdk' | ||
|
||
export const selectedWalletMainAccount: Readable<OutputData | undefined> = derived( | ||
[selectedWallet, selectedWalletMainAccountId], | ||
([$selectedWallet, $selectedWalletMainAccountId]) => | ||
$selectedWallet?.accountOutputs?.find( | ||
(account) => (account?.output as AccountOutput)?.accountId === $selectedWalletMainAccountId | ||
) | ||
) |
Oops, something went wrong.