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

Cache.import returns an Object instead of a Cache #31

Closed
mhchia opened this issue Feb 22, 2023 · 0 comments · Fixed by #33
Closed

Cache.import returns an Object instead of a Cache #31

mhchia opened this issue Feb 22, 2023 · 0 comments · Fixed by #33
Assignees
Labels
bug Something isn't working

Comments

@mhchia
Copy link
Member

mhchia commented Feb 22, 2023

What's wrong?

rlnjs/src/cache.ts

Lines 109 to 111 in da3fd80

public static async import(cache: string): Promise<Cache> {
return JSON.parse(cache) as Cache
}

As the title, Cache.import is expected to return a Cache object, but it's just a Object now.

How to fix it?

  • Still parse cache: string with JSON.parse
  • Instantiate a new Cache
  • Copy all content in cache to Cache.cache
@github-project-automation github-project-automation bot moved this to 🆕 Ideas in RLN JS lib Feb 22, 2023
@AtHeartEngineer AtHeartEngineer moved this from 🆕 Ideas to 🏗 In progress in RLN JS lib Feb 22, 2023
@AtHeartEngineer AtHeartEngineer added the bug Something isn't working label Feb 22, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to 👀 In review in RLN JS lib Feb 23, 2023
@mhchia mhchia moved this from 👀 In review to ✅ Done in RLN JS lib May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants