Skip to content
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

Account index fix #397

Merged
merged 3 commits into from
Nov 18, 2024
Merged

Account index fix #397

merged 3 commits into from
Nov 18, 2024

Conversation

jinglescode
Copy link
Member

  • set index numbers earlier in constructor
  • send index numbers in signData

Summary

MeshWallet is targeted to have the ability to access an account at any index generated from an HD mnemonic (or a root private key). But it was not able to access any account other than the first one.

  1. After rearranging some lines of code, MeshWallet is now able to utilize the provided accountIndex and keyIndex when an instance is created, which was not the case before, because getAddressesFromWallet() was getting called before setting those indexes.
  2. In MeshWallet's signData(), the accountIndex and keyIndex are now being passed to the EmbeddedWallet's signData().

Affect components

Please indicate which part of the Mesh Repo

  • @meshsdk/common
  • @meshsdk/contract
  • @meshsdk/core
  • @meshsdk/core-csl
  • @meshsdk/core-cst
  • @meshsdk/provider
  • @meshsdk/react
  • @meshsdk/transaction
  • @meshsdk/wallet
  • Mesh playground (i.e. https://meshjs.dev/)
  • Mesh CLI

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Bug fix (non-breaking change which fixes an issue)
  • Code refactoring (improving code quality without changing its behavior)
  • Documentation update (adding or updating documentation related to the project)

Related Issues

Not any

Checklist

Please ensure that your pull request meets the following criteria:

  • My code is appropriately commented and includes relevant documentation, if necessary
  • I have added tests to cover my changes, if necessary
  • I have updated the documentation, if necessary
  • All new and existing tests pass (i.e. npm run test)
  • The build is pass (i.e. npm run build)

Dharmveer Bharti and others added 3 commits November 18, 2024 00:35
- set index numbers earlier in constructor
- send index numbers in signData
Account index and key index fix in MeshWallet
Copy link

vercel bot commented Nov 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mesh-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 0:59am
mesh-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 0:59am

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.

1 participant