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

adds networkId to wallet, accountImport #5042

Merged
merged 6 commits into from
Jun 17, 2024

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Jun 13, 2024

Summary

adds networkId to wallet and wallet constructor. node wallets and standalone wallets can only run on a single network without reset. the networkId is stored in the 'internal' file, so it is not necessary to persist networkId in wallet metadata

adds networkId field to 'AccountImport' type to indicate which networkId an account was running on at export time. the network that an account was running on is only important when importing the account to another node

uses networkId to determine if imported account birthday matches network instead of looking up block from chain. this will avoid resetting the account birthday if imported to a node that hasn't synced to the birthday yet

Testing Plan

updates existing unit tests

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes

adds networkId to wallet and wallet constructor. node wallets and standalone
wallets can only run on a single network without reset. the networkId is stored
in the 'internal' file, so it is not necessary to persist networkId in wallet
metadata

adds networkId field to 'AccountImport' type to indicate which networkId an
account was running on at export time. the network that an account was running
on is only important when importing the account to another node

uses networkId to determine if imported account birthday matches network instead
of looking up block from chain. this will avoid resetting the account birthday
if imported to a node that hasn't synced to the birthday yet
@hughy hughy requested a review from a team as a code owner June 13, 2024 22:08
removes incorrect yup field for networkId in json encoder

only logs warning message on import if networkId is defined in imported account
@hughy hughy merged commit 04d37fa into staging Jun 17, 2024
9 checks passed
@hughy hughy deleted the feat/hughy/account-import-networkid branch June 17, 2024 23: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