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 #17

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Multi contract keystore #17

wants to merge 7 commits into from

Conversation

gtsonevv
Copy link
Collaborator

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 #0000) and the maintainers have approved on my working plan.

Motivation

Test Plan

Related issues/PRs

@gtsonevv gtsonevv requested review from pivanov and vikinatora July 23, 2024 14:14
Copy link

@pivanov pivanov left a comment

Choose a reason for hiding this comment

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

r+

*/
export class MultiContractBrowserLocalStorageKeyStore extends MultiContractKeyStore {
/** @hidden */
private localStorage: any;
Copy link

@pivanov pivanov Jul 23, 2024

Choose a reason for hiding this comment

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

Suggested change
private localStorage: any;
private localStorage: Storage;

* @param networkId The targeted network. (ex. default, betanet, etc…)
*/
async getAccounts(networkId: string): Promise<string[]> {
const result = new Array<string>();
Copy link

Choose a reason for hiding this comment

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

Suggested change
const result = new Array<string>();
const result: string[] = [];

* @param accountId The targeted account.
*/
async getContracts(networkId: string, accountId: string): Promise<string[]> {
const result = new Array<string>();
Copy link

Choose a reason for hiding this comment

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

Suggested change
const result = new Array<string>();
const result: string[] = [];

/** @hidden */
private *storageKeys(): IterableIterator<string> {
for (let i = 0; i < this.localStorage.length; i++) {
yield this.localStorage.key(i);
Copy link

Choose a reason for hiding this comment

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

Suggested change
yield this.localStorage.key(i);
yield this.localStorage.key(i) as string;

@gtsonevv gtsonevv requested a review from pivanov July 24, 2024 06:49
Copy link

@pivanov pivanov left a comment

Choose a reason for hiding this comment

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

r+

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