-
Notifications
You must be signed in to change notification settings - Fork 8
Add useAllowance and useSend hooks; update tailwind config with safelist #550
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new hooks for handling token allowances and asset transfers in a Massa blockchain React application. The changes add utility functions for transaction validation and new hooks that integrate with the Massa Web3 provider.
Key changes:
- Adds
useAllowanceanduseSendhooks for managing token approvals and transfers - Implements transaction validation utilities for amount and balance checks
- Adds debug logging to operation handling
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/massa-react/utils/sendTransaction.ts | New utility functions for validating transaction amounts and calculating costs |
| src/lib/massa-react/utils/operationHandler.ts | Adds debug logging to operation processing |
| src/lib/massa-react/hooks/useSend.ts | New hook for handling native token and MRC20 token transfers |
| src/lib/massa-react/hooks/useAllowance.tsx | New hook for managing MRC20 token allowances (increase/decrease) |
| src/lib/massa-react/hooks/index.ts | Exports the new hooks for public use |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…Send hooks; streamline validation in sendTransaction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/lib/massa-react/hooks/useSend.ts:1
- Debug console.log statements (lines 21, 38-39, 41, 45, 52, 62, 65, 117) should be removed from production code. Consider using a proper logging library or removing before merging.
import { useCallback, useMemo, useState } from 'react';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/lib/massa-react/hooks/useSend.ts:1
- Debug console.log statements throughout this file (lines 21, 38, 39, 41, 45, 52, 62, 65, 117) should be removed from production code or replaced with a proper logging utility.
import { useCallback, useMemo, useState } from 'react';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…ove safelist from tailwind config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
… amount previews for better clarity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…oks to improve clarity and remove unused validation logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.