Skip to content

Conversation

@ScottJamesPhillips
Copy link
Contributor

@ScottJamesPhillips ScottJamesPhillips commented Mar 10, 2025

Describe changes

  • Account managment page
  • Add & Edit account page
  • Remove account functionality
  • Fix bug in key decryptor relating to miscasting serializable data
  • Ability to switch between current account in current wallet
  • Added accounts derived from key agent and wallet seed phrase.

Ticket or discussion link

N/A

Review checklist

  • Proper documentation added
  • Proper tests added

Screenshots

Account managmet screen

Screenshot 2025-03-10 at 16 50 36 Screenshot 2025-03-10 at 16 58 48

Editing an account

Screenshot 2025-03-10 at 16 55 34 Screenshot 2025-03-10 at 16 51 11

Removing an account

Screenshot 2025-03-10 at 16 52 16

Can only remove the last credential in the list (to preserve account and address index count used in new account derivation)
Screenshot 2025-03-10 at 17 09 21

Can not remove the initial account (at index 0).
Screenshot 2025-03-10 at 17 09 34

Wallet state using new account

Screenshot 2025-03-10 at 16 52 43

@deepsource-io
Copy link

deepsource-io bot commented Mar 10, 2025

Here's the code health analysis summary for commits 4658892..cabe3b9. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ Success
❗ 28 occurences introduced
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@ScottJamesPhillips
Copy link
Contributor Author

ScottJamesPhillips commented Mar 11, 2025

Worth noting, I believe there is a potential bug that needs sorting. At the moment when editing setting a wallet is based on credential name and on editing account name we are only editing account name.
This means when editing account at index 0, we end up with 2 accounts with different names with index 0. To overcome this, I am manually removing the 'initial' wallet version, however the 'updated' value is appended to the end of the account list.
Currently index 0 is not deletable, however if this was to be done for an account at another index ie 2, and the wallet list index order was 0,1,3,4,2 and a user was to delete the last element (2), they would never be able to regenerate it.

To fix this we either list accounts ALWAYS in index order OR we set credential/account based on address/account index and not credential name, thus not inserting a new entry to the list each time edit name is done.

@ScottJamesPhillips
Copy link
Contributor Author

ScottJamesPhillips commented Mar 12, 2025

Have fixed the potential bug pointed out in above comment with the commit 45dcc2c

Ordering accounts by address index inside useEffect reorders list on account edit. Also a check in place on delete to ensure that the account to delete's address index is accounts length -1. This ensures deletion of last indexed account only.

@mrcnk mrcnk merged commit a111fc2 into berillos:main Mar 15, 2025
2 checks passed
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