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

fix: correct proposal state store #5474

Merged
merged 3 commits into from Dec 21, 2022

Conversation

Tuditi
Copy link
Contributor

@Tuditi Tuditi commented Dec 21, 2022

Summary

Update proposals state so that it is per profile

Changelog

- Update proposals sate interface

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

Please select any platforms where your changes have been tested.

  • Desktop
    • MacOS
    • Linux
    • Windows
  • Mobile
    • iOS
    • Android

Instructions

Please describe the specific instructions, configurations, and/or test cases necessary to test and verify that your changes work as intended.

...

Checklist

Please tick all of the following boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or modified tests that prove my changes work as intended
  • I have verified that new and existing unit tests pass locally with my changes
  • I have verified that my latest changes pass CI workflows for testing and linting
  • I have made corresponding changes to the documentation

@Tuditi Tuditi self-assigned this Dec 21, 2022
@Tuditi Tuditi linked an issue Dec 21, 2022 that may be closed by this pull request
3 tasks
Copy link
Contributor

@maxwellmattryan maxwellmattryan left a 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/shared/components/organisms/ProposalCard.svelte Outdated Show resolved Hide resolved
Comment on lines 1 to +5
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'
Copy link
Contributor

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)
Copy link
Contributor

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

Copy link
Contributor

@maxwellmattryan maxwellmattryan left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

@maxwellmattryan maxwellmattryan merged commit c5a9cac into stardust-develop Dec 21, 2022
@maxwellmattryan maxwellmattryan deleted the fix/correct-proposal-state-store branch December 21, 2022 15:56
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.

[Task]: Query eventId's in proposalsState per profile
2 participants