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
fix: correct proposal state store #5474
fix: correct proposal state store #5474
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor requested changes 🙏
packages/desktop/views/dashboard/governance/views/DetailsView.svelte
Outdated
Show resolved
Hide resolved
packages/shared/lib/contexts/governance/interfaces/proposal-state.interface.ts
Show resolved
Hide resolved
import { get } from 'svelte/store' | ||
import type { EventStatus } from '@iota/wallet' | ||
import { getVotingProposalState } from '@core/profile-manager/api' | ||
import { activeProfileId } from '@core/profile/stores' | ||
import { persistent } from '@core/utils/store' | ||
import { IProposalState } from '../interfaces' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind cleaning the imports here too 🙏
_proposalsState[eventId] = proposalStatus | ||
proposalsState.set(_proposalsState) | ||
|
||
const proposalStatus = await getVotingProposalState(eventId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be proposalState
rather than having "status" in the name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🔥
Summary
Update proposals state so that it is per profile
Changelog
Relevant Issues
closes: #5452
Testing
Add the following line of code to reset proposalsState: https://github.com/iotaledger/firefly/blob/fix/correct-proposal-state-store/packages/shared/lib/contexts/governance/stores/proposals-state.store.ts#L10
proposalsState.set({})
Platforms
Instructions
...
Checklist