Skip to content

Conversation

detherminal
Copy link
Contributor

@detherminal detherminal commented Mar 20, 2024

Added Solana with all functionalities:

  • mnemonic generation/restoration
  • address derivation
  • balance control
  • transaction control
  • transfering
  • rent exemption of Solana
  • price fetching
    etc. etc.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 41.20%. Comparing base (414803d) to head (05d0889).
Report is 68 commits behind head on staging.

Files Patch % Lines
lib/utilities/enums/coin_enum.dart 0.00% 11 Missing ⚠️
lib/utilities/constants.dart 0.00% 7 Missing ⚠️
lib/themes/color_theme.dart 0.00% 3 Missing ⚠️
lib/themes/stack_colors.dart 0.00% 2 Missing ⚠️
...ib/models/isar/models/blockchain_data/address.dart 0.00% 1 Missing ⚠️
lib/utilities/amount/amount_unit.dart 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##           staging     #816       +/-   ##
============================================
+ Coverage     5.83%   41.20%   +35.36%     
============================================
  Files          741       54      -687     
  Lines        70283     4638    -65645     
============================================
- Hits          4100     1911     -2189     
+ Misses       66183     2727    -63456     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


@override
bool validateAddress(String address) {
RegExp regex = RegExp(r'^[a-zA-Z0-9]{44}$');
Copy link
Member

Choose a reason for hiding this comment

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

TODO better validation

// Rent exemption of Solana
final accInfo = await rpcClient.getAccountInfo((await _getKeyPair()).address);
final minimumRent = await rpcClient.getMinimumBalanceForRentExemption(accInfo.value!.data.toString().length);
var spendableBalance = balance.value - minimumRent;
Copy link
Member

Choose a reason for hiding this comment

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

What if we want to send more than the minimum rent out of the wallet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The account have to be closed to fully send all funds.

Copy link
Member

Choose a reason for hiding this comment

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

Can we actually do that?

Copy link
Member

@sneurlax sneurlax left a comment

Choose a reason for hiding this comment

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

Looks good to me although I still need to review if Tor usage works with the RpcClient as used here

@sneurlax sneurlax changed the base branch from staging to solana March 21, 2024 17:47
@sneurlax sneurlax merged commit 1fd3e87 into cypherstack:solana Mar 21, 2024
@sneurlax
Copy link
Member

@detherminal I merged your changes to the solana branch, where I will hide Solana behind a toggle in the developer menu so we can test it more thoroughly. To access the developer menu, click the Stack Wallet logo 7 times (it should spin when clicked)

The notes here on this PR should be followed up on but we might convert them to issues and leave them to be upon improved later

@sneurlax sneurlax mentioned this pull request Mar 21, 2024
4 tasks
@sneurlax sneurlax mentioned this pull request Apr 19, 2024
5 tasks
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