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

Integrate useTransaction fee hook on all transactions #4761

Merged
merged 53 commits into from
Feb 1, 2023

Conversation

eniolam1000752
Copy link
Contributor

@eniolam1000752 eniolam1000752 commented Jan 26, 2023

What was the problem?

This PR resolves #4717, #4719, #4781

How was it solved?

  • Implement usePriority fee hook
  • refactor useTransactionFee hook to only consume useByteFee hook and usePriority hook
  • Abstract byte fee calculation to a separate hook
  • Integrate useTransactionFee hook into TxComposer
  • Integrate extra command hook on SendToken and register delegate form
  • Create a helper utils that converts a token to a particular denom
  • update unit tests

How was it tested?

  • jest
  • visually

@reyraa reyraa force-pushed the 4717-implement-priority-fee-hook branch from 2ef8f4a to 45d9ccc Compare January 30, 2023 12:49
Copy link
Contributor

@ManuGowda ManuGowda left a comment

Choose a reason for hiding this comment

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

Nice job 🎉

src/modules/auth/hooks/queries/useGetInitializationFees.js Outdated Show resolved Hide resolved
src/modules/transaction/components/TxComposer/index.js Outdated Show resolved Hide resolved
src/modules/transaction/constants.js Outdated Show resolved Hide resolved
Copy link
Contributor

@ManuGowda ManuGowda left a comment

Choose a reason for hiding this comment

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

Replied to few comments. I think test will still fail due to

export const FEE_TYPES = {
  BYTES_FEE: 'bytesFee',
  PRIORITY_FEE: 'priorityFee',
  USER_ACCOUNT_INITIALIZATION: 'userAccountInitialization',
  ESCROW_ACCOUNT_INITIALIZATION: 'escrowAccountInitialization',
  VALIDATOR_REGISTRATION: 'validatorRegistration',
};

@eniolam1000752 eniolam1000752 requested review from ManuGowda and reyraa and removed request for oskarleonard February 1, 2023 07:54
@ManuGowda
Copy link
Contributor

Merging this PR as Ali reviewed and approved it offline, since he his on holiday until monday we are merging with one approval.

@ManuGowda ManuGowda merged commit 6014148 into feature/dpos-update Feb 1, 2023
@ManuGowda ManuGowda deleted the 4717-implement-priority-fee-hook branch February 1, 2023 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants