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

use nance-sdk in nance-interface #109

Open
3 of 4 tasks
twodam opened this issue Oct 10, 2023 · 3 comments
Open
3 of 4 tasks

use nance-sdk in nance-interface #109

twodam opened this issue Oct 10, 2023 · 3 comments

Comments

@twodam
Copy link
Collaborator

twodam commented Oct 10, 2023

  • types
  • api endpoints
  • hooks
  • export as an npm package
@twodam twodam added this to nance-1.0 Oct 10, 2023
@twodam twodam converted this from a draft issue Oct 10, 2023
@twodam twodam moved this from Todo to In Progress in nance-1.0 Oct 10, 2023
@jigglyjams
Copy link
Contributor

we should update Proposal type. Currently has a lot of legacy things from notion

Currently:

export interface Proposal {
  hash: string;
  title: string;
  body?: string;
  governanceCycle?: number;
  date?: string,
  status: string;
  proposalId: number | null;
  author?: string;
  coauthors?: string[];
  discussionThreadURL: string;
  ipfsURL: string;
  voteURL: string;
  voteSetup?: SnapshotVoteOptions;
  internalVoteResults?: InternalVoteResults;
  voteResults?: VoteResults;
  version?: string;
  authorAddress?: string;
  authorDiscordId?: string;
  temperatureCheckVotes?: number[];
  createdTime?: Date;
  lastEditedTime?: Date;
  actions?: Action[];
}

I am using a different type internally called SQLProposal

can we just unify on SQLProposal and rename to Proposal

export type SQLProposal = {
  uuid: string;
  createdTime: Date;
  lastEditedTime: Date;
  title: string;
  body: string;
  authorAddress: string;
  coauthors: string[];
  authorDiscordId?: string;
  proposalStatus: string;
  proposalId?: number;
  temperatureCheckVotes: number[];
  snapshotId?: string;
  voteType: string;
  choices: string[];
  snapshotVotes: number[];
  voteAddressCount: number;
  governanceCycle: number;
  discussionURL?: string;
  ipfsCID?: string;
  actions: Action[];
};

@jigglyjams
Copy link
Contributor

@twodam
Copy link
Collaborator Author

twodam commented Nov 2, 2023

should add functions to support vanilla js fetch in case client is not using React

@twodam twodam moved this from In Progress to Done in nance-1.0 Dec 13, 2023
@twodam twodam moved this from Done to In Progress in nance-1.0 Dec 13, 2023
@jigglyjams jigglyjams changed the title nance-sdk use nance-sdk in nance-interface May 24, 2024
@jigglyjams jigglyjams moved this from In Progress to Todo in nance-1.0 May 24, 2024
@jigglyjams jigglyjams removed the status in nance-1.0 Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants