refactor: quick transfers handling and finance components #393
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to enhance the finance-related components and hooks in the project. The changes include adding new functionalities, improving existing features, and cleaning up the codebase.
Enhancements to Finance Components:
src/hooks/use-metamask.ts
: AddedsetAddress
to the returned object to allow changing the address.src/sections/finance/components/finance-deposit-from-metamask.tsx
: Updated to includesetAddress
in theuseMetaMask
hook and addedonChangeWallet
prop toFinanceDeposit
component.src/sections/finance/components/finance-deposit.tsx
: AddedonChangeWallet
prop to handle address changes and updated the label from "Amount to withdraw" to "Amount to deposit". [1] [2] [3] [4]Code Cleanup and Refactoring:
src/hooks/use-withdraw.ts
: Changed therecipient
type fromstring
toAddress
for better type safety.src/sections/finance/components/finance-withdraw-from-metamask.tsx
: ReplaceduseWithdrawMetamask
anduseGetVaultBalance
withuseWithdraw
and addedsetAddress
touseMetaMask
.src/sections/finance/components/finance-withdraw.tsx
: Removed unnecessary address input fields and related state management, and addedonChangeWallet
prop for changing the address. [1] [2] [3] [4] [5] [6] [7]Improvements to FinanceQuickTransfer Component:
src/sections/finance/components/finance-quick-transfer.tsx
: Added state management forcanContinue
to enable or disable the transfer button based on the amount validation, and added a click handler for carousel items. [1] [2] [3] [4] [5] [6] [7] [8] [9]