Skip to content

feat: cache claimed withdrawal status in local storage #2371

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

Merged
merged 6 commits into from
Apr 30, 2025

Conversation

brtkx
Copy link
Contributor

@brtkx brtkx commented Apr 2, 2025

closes FS-1053

@cla-bot cla-bot bot added the cla-signed label Apr 2, 2025
Copy link

vercel bot commented Apr 2, 2025

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

Name Status Preview Updated (UTC)
arbitrum-token-bridge ✅ Ready (Inspect) Visit Preview Apr 30, 2025 10:28am

@brtkx brtkx changed the title feat: cache withdrawal status feat: cache withdrawal status in local storage Apr 2, 2025
@brtkx brtkx changed the title feat: cache withdrawal status in local storage feat: cache claimed withdrawal status in local storage Apr 2, 2025
Comment on lines 13 to 27
if (!localStorageItem) {
localStorage.setItem(
localStorageKey,
JSON.stringify({ ...localStorageValue })
)
return
}

localStorage.setItem(
localStorageKey,
JSON.stringify({
...JSON.parse(localStorageItem),
...localStorageValue
})
)
Copy link
Member

Choose a reason for hiding this comment

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

can you do this instead?

Suggested change
if (!localStorageItem) {
localStorage.setItem(
localStorageKey,
JSON.stringify({ ...localStorageValue })
)
return
}
localStorage.setItem(
localStorageKey,
JSON.stringify({
...JSON.parse(localStorageItem),
...localStorageValue
})
)
localStorage.setItem(
localStorageKey,
JSON.stringify({
...JSON.parse(localStorageItem ?? '{}'),
...localStorageValue
})
)

@spsjvc spsjvc merged commit 7f720e3 into master Apr 30, 2025
81 checks passed
@spsjvc spsjvc deleted the cache-withdrawal-status branch April 30, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants