Skip to content

Commit

Permalink
chore: remove deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
nguernse committed Apr 29, 2024
1 parent f99b73e commit a0ce04b
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/features/vote/proposals/services/proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,37 +465,3 @@ async function simulateFetchProposals(cursor?: string): Promise<{

return Promise.resolve(responseData);
}

/**
* @todo Replace with actual API call once it's ready.
*/
export async function voteForProposal(payload: VotePayload): Promise<void> {
console.log('votePayload', payload);

// fetch(`https://api.tulsawebdevs.org/proposals/${proposal.id}/vote`, {
// credentials: 'include',
// headers: {
// Authorization: '3fa85f64-5717-4562-b3fc-2c963f66afa6', // TODO: Add auth token
// 'Content-Type': 'application/json',
// },
// method: 'POST',
// body: JSON.stringify(votePayload),
// })
// .then((res) => res.json())
// .then((data) => {
// console.log('do something with data', data);
// })
// .catch((error) => {
// // TODO: Handle inability to cast vote
// console.error(error);
// });

return simulateVoteForProposal();
}

async function simulateVoteForProposal(): Promise<void> {
// eslint-disable-next-line
await new Promise((resolve) => setTimeout(resolve, 500));

return Promise.resolve();
}

0 comments on commit a0ce04b

Please sign in to comment.