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

Multi contract keystore #1369

Conversation

gtsonevv
Copy link
Collaborator

@gtsonevv gtsonevv commented Aug 5, 2024

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • Commit messages follow the conventional commits spec
  • If this is a code change: I have written unit tests.
  • If this changes code in a published package: I have run pnpm changeset to create a changeset JSON document appropriate for this change.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #1155) and the maintainers have approved on my working plan.

Motivation

Test Plan

Added unit tests.

Related issues/PRs

#1163

Copy link

changeset-bot bot commented Aug 5, 2024

🦋 Changeset detected

Latest commit: 5148b67

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@near-js/keystores Minor
@near-js/keystores-browser Minor
@near-js/accounts Patch
@near-js/keystores-node Patch
near-api-js Patch
@near-js/signers Patch
@near-js/transactions Patch
@near-js/wallet-account Patch
@near-js/cookbook Patch
@near-js/providers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gtsonevv gtsonevv requested a review from andy-haynes August 5, 2024 09:14
Copy link
Collaborator

@andy-haynes andy-haynes left a comment

Choose a reason for hiding this comment

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

Just one CYA otherwise looking good.

Is it possible to retain the commit history so that Amir remains author on the parts he wrote? I can try to merge the original PR into a feature branch that you could rebase off of if that's easier.

constructor(localStorage: any = window.localStorage, prefix = LOCAL_STORAGE_KEY_PREFIX) {
super();
this.localStorage = localStorage;
this.prefix = prefix;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we please make this this.prefix = prefix || LOCAL_STORAGE_PREFIX;?

In the current implementation, an empty string prefix means clear() would delete all localstorage entries.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let's merge the original PR into a feature branch.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gtsonevv go ahead and rebase your changes on top of #1370 and we can merge that once your changes are in.

@andy-haynes andy-haynes changed the base branch from master to feat/multi-contract-keystore-rebased August 15, 2024 17:53
@andy-haynes andy-haynes changed the base branch from feat/multi-contract-keystore-rebased to master August 15, 2024 17:55
@andy-haynes andy-haynes changed the base branch from master to feat/multi-contract-keystore-rebased August 19, 2024 16:11
@andy-haynes
Copy link
Collaborator

Moved to #1370

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.

Create LAKBrowserKeystore to facilitate tracking multiple LAKs for a single account at once
2 participants