Skip to content

[trello.com/c/hzqPFC5l] Update "Send Crypto" screen to use with secret wallets #733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 3, 2025

Conversation

Lainaaa
Copy link
Collaborator

@Lainaaa Lainaaa commented Mar 17, 2025

You can find description of the main part in comments.


$0.value = secretWalletViewModel.state.currentWallet?.name ?? String.localized("SecretWallets.Menu.Regular", comment: "Regular Wallet")

for wallet in secretWalletManager.getRegularWallet().sorted(includeInvisible: false) where wallet.core.wallet?.address == walletCore.wallet?.address {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This view controller is used on two different screens. On the account tab, you can access it by tapping "Send (cryptoTokenName)". In an open chat, you can find it by tapping the plus button and choosing "Transfer Crypto".

Even though the same component is used in both places, the context for secret wallets differs: in the chat, only the regular wallet can be used, whereas on the account tab, it doesn’t matter if the wallet is secret or regular.

My solution is simple:
By default, we show the name from the current wallet (which might be secret). However, if the regular wallet has the same address as the current wallet in the view controller, we change the display name to "Regular Wallet".

@Lainaaa Lainaaa marked this pull request as ready for review March 17, 2025 13:37
@Lainaaa Lainaaa self-assigned this Mar 17, 2025
Copy link
Member

@vovameister vovameister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well done

@Lainaaa Lainaaa merged commit 995ad77 into trello.com/c/vawidi4o Apr 3, 2025
@Lainaaa Lainaaa deleted the trello.com/c/hzqPFC5l branch April 3, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants