Skip to content

Activate Stellar in imported wallets#1011

Merged
AlaaElattar merged 28 commits into
developmentfrom
developement_activate_stellar
May 11, 2025
Merged

Activate Stellar in imported wallets#1011
AlaaElattar merged 28 commits into
developmentfrom
developement_activate_stellar

Conversation

@AlaaElattar
Copy link
Copy Markdown
Contributor

Changes

  • Added component for activate stellar throughout another wallet.

Related Issues

Tested Scenarios

  • Tested activating imported wallets.

@AlaaElattar AlaaElattar marked this pull request as draft May 5, 2025 13:45
@AlaaElattar AlaaElattar marked this pull request as ready for review May 6, 2025 11:04
@AlaaElattar
Copy link
Copy Markdown
Contributor Author

2025-05-06.14.02.57.mp4

Copy link
Copy Markdown
Contributor

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

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

Activation works but I found that loading doesn't stop even after activation is done and dialogue is closed.

Also, can we align the 'please select a wallet to activate ..." at the start?

Comment thread app/lib/widgets/wallets/activate_wallet.dart Outdated
Comment on lines +83 to +84
if (double.parse(_selectedWallet!.stellarBalance) < (tftPrice * 3)) {
setState(() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we use a constant instead of hardcoding the value 3, just to make things clearer?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  • This 3 is the required xlms for activation.

Comment thread app/lib/widgets/wallets/activate_wallet.dart Outdated
@AlaaElattar AlaaElattar marked this pull request as draft May 6, 2025 14:24
@AlaaElattar AlaaElattar marked this pull request as ready for review May 6, 2025 14:44
@AlaaElattar AlaaElattar marked this pull request as draft May 7, 2025 06:17
@AlaaElattar AlaaElattar marked this pull request as ready for review May 7, 2025 06:43
@AlaaElattar AlaaElattar requested a review from zaelgohary May 7, 2025 07:15
Comment thread app/lib/widgets/wallets/activate_wallet.dart Outdated
@zaelgohary
Copy link
Copy Markdown
Contributor

zaelgohary commented May 7, 2025

I got this when trying to activate my wallet.

image

@AlaaElattar AlaaElattar marked this pull request as draft May 7, 2025 10:01
Copy link
Copy Markdown
Contributor

@AhmedHanafy725 AhmedHanafy725 left a comment

Choose a reason for hiding this comment

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

What if the wallet is already activated but doesn't have the trustline?

Comment thread app/lib/services/stellar_service.dart Outdated
Comment thread app/lib/services/stellar_service.dart
Comment thread app/lib/widgets/wallets/activate_wallet.dart
Comment thread app/lib/widgets/wallets/activate_wallet.dart Outdated
@AhmedHanafy725
Copy link
Copy Markdown
Contributor

Maybe also it would be good if we show the wallet balance in the dropdown beside its name, so the user can select based on the balance

@AlaaElattar
Copy link
Copy Markdown
Contributor Author

Maybe also it would be good if we show the wallet balance in the dropdown beside its name, so the user can select based on the balance

@AlaaElattar AlaaElattar marked this pull request as ready for review May 8, 2025 07:04
@AhmedHanafy725
Copy link
Copy Markdown
Contributor

When the wallet is activated, it's shown as Not activated. It should look different as it doesn't have the TFT trustline. Also, the user should pay fewer tokens in that case.

@AlaaElattar AlaaElattar marked this pull request as draft May 11, 2025 06:47
@AlaaElattar AlaaElattar marked this pull request as ready for review May 11, 2025 10:31
@AlaaElattar AlaaElattar marked this pull request as draft May 11, 2025 12:30
@AlaaElattar AlaaElattar marked this pull request as ready for review May 11, 2025 13:52
Copy link
Copy Markdown
Contributor

@AhmedHanafy725 AhmedHanafy725 left a comment

Choose a reason for hiding this comment

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

In some cases, just handle the balance if it's == -1 and don't handle the new value -2, please check them.

Comment thread app/lib/widgets/wallets/balance_tile.dart Outdated
Comment thread app/lib/widgets/wallets/wallet_card.dart Outdated
Comment thread app/lib/widgets/wallets/activate_wallet.dart Outdated
Comment thread app/lib/widgets/wallets/activate_wallet.dart Outdated
Comment thread app/lib/widgets/wallets/activate_wallet.dart Outdated
AlaaElattar and others added 8 commits May 11, 2025 17:09
Co-authored-by: AhmedHanafy725 <41957921+AhmedHanafy725@users.noreply.github.com>
Co-authored-by: AhmedHanafy725 <41957921+AhmedHanafy725@users.noreply.github.com>
Co-authored-by: AhmedHanafy725 <41957921+AhmedHanafy725@users.noreply.github.com>
Co-authored-by: AhmedHanafy725 <41957921+AhmedHanafy725@users.noreply.github.com>
Co-authored-by: AhmedHanafy725 <41957921+AhmedHanafy725@users.noreply.github.com>
@AlaaElattar AlaaElattar merged commit 6283af3 into development May 11, 2025
2 checks passed
@AlaaElattar AlaaElattar deleted the developement_activate_stellar branch May 11, 2025 15:22
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.

3 participants