Skip to content

CAS-367 - Update to use react-query#362

Merged
germanurrus merged 98 commits intomainfrom
germanurrustarazu/cas-367
Sep 12, 2022
Merged

CAS-367 - Update to use react-query#362
germanurrus merged 98 commits intomainfrom
germanurrustarazu/cas-367

Conversation

@germanurrus
Copy link
Copy Markdown
Contributor

@germanurrus germanurrus commented Aug 12, 2022

  • updated all hooks to use react-query on endpoint calls.
  • Some hooks that used to have more than one action were split into two or more to have one hook with one action

Please test all the user actions that will make GET, POST, PATCH and DELETE requests.

@germanurrus germanurrus changed the title CAS-367 - Update to latest version react-query CAS-367 - Update to use react-query Aug 12, 2022
@germanurrus germanurrus marked this pull request as ready for review September 8, 2022 23:57
@linear
Copy link
Copy Markdown

linear Bot commented Sep 8, 2022

CAS-367

@germanurrus germanurrus requested a review from jbluks September 8, 2022 23:58
maxWeight: '2222',
publicPath: 'flowTokenBalance',
}
: undefined),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added this logic to have some data to test easier, once reviewed will be removed. Use Token-weighted

Comment thread frontend/packages/client/src/api/communityUsers.js Outdated
Comment thread frontend/packages/client/src/api/communityUsers.js Outdated
Comment thread frontend/packages/client/src/api/communityUsers.js Outdated
Comment thread frontend/packages/client/src/api/proposals.js Outdated
Comment thread frontend/packages/client/src/hooks/useCommunityDetailsUpdate.js Outdated
Comment thread frontend/packages/client/src/hooks/useFileUploader.js Outdated
const message = `${proposal.id}:${hexChoice}:${timestamp}`;
const hexMessage = Buffer.from(message).toString('hex');

const [compositeSignatures, voucher] = await signMessageByWalletProvider(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we move this into a function in our api directory?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

created voteOnProposalApiReq fn but I think as a general approach we could leave signing the request in the react-query definition, otherwise we need to pass to the function the signMessageByWalletProvider and the user since they come from a hook they can't be included in a regular function because of hook restrictions

Comment thread frontend/packages/client/src/hooks/useVotesForAddress.js Outdated
Comment thread frontend/packages/client/src/hooks/useVotingResults.js Outdated
Comment thread frontend/packages/client/src/hooks/useVotingStrategies.js Outdated
@germanurrus germanurrus merged commit c3bf9c0 into main Sep 12, 2022
@germanurrus germanurrus deleted the germanurrustarazu/cas-367 branch September 12, 2022 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants