Skip to content

Conversation

@gbonumore
Copy link

@gbonumore gbonumore commented Oct 17, 2025

  • Added useApprovePreDepositToken hook for token approval process.
  • Implemented useExchangeRate hook to fetch token exchange rates from Binance.
  • Developed useMaxPreDepositValue hook to read maximum deposit amount for a user.
  • Introduced usePreDepositStateContext and usePreDepositStateMachine for managing pre-deposit state.
  • Created usePreDepositVault hook for depositing tokens into a vault.
  • Updated DashboardPage to include vault selection and pre-deposit modal.

closes #775

- Added useApprovePreDepositToken hook for token approval process.
- Implemented useExchangeRate hook to fetch token exchange rates from Binance.
- Developed useMaxPreDepositValue hook to read maximum deposit amount for a user.
- Introduced usePreDepositStateContext and usePreDepositStateMachine for managing pre-deposit state.
- Created usePreDepositVault hook for depositing tokens into a vault.
- Updated DashboardPage to include vault selection and pre-deposit modal.
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

⚠️ No Changeset found

Latest commit: 0eb720e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 17, 2025

@gbonumore is attempting to deploy a commit to the Status Team on Vercel.

A member of the Team first needs to authorize it.

@felicio felicio requested review from a team, JulesFiliot, felicio, jinhojang6 and jkbktl October 18, 2025 01:25
const { name, apy, rewards, icon, onDeposit } = props
const apyValue = apy.endsWith('%') ? apy.slice(0, -1) : apy
const rewardsLine = rewards.join(', ')
const rewardsLine = rewards.map(reward => reward.name).join(', ')

Choose a reason for hiding this comment

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

what are the chances that reward.name is not undefined?

Copy link
Author

Choose a reason for hiding this comment

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

this is defined by us, since it's required this would not compile

Copy link

@JulesFiliot JulesFiliot left a comment

Choose a reason for hiding this comment

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

All good, just some magic numbers.

Also an open question but why don't we use SVGs for icons?

.with({ exchangeRate: P.nullish }, () => 0)
.with({ amountInputNumber: P.when(n => isNaN(n) || n <= 0) }, () => 0)
.with({ calculatedUSD: P.when(n => !isFinite(n)) }, () => null)
.with({ calculatedUSD: P.when(n => n > 1_000_000_000_000) }, () => null)

Choose a reason for hiding this comment

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

There must be a good reason but why 1_000_000_000_000 specifically?

Copy link
Author

@gbonumore gbonumore Oct 21, 2025

Choose a reason for hiding this comment

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

This is to avoid insanely dollar values and do useless api calls, so this check might not be even here (this is more or less the same UX swap protocols offer when you try to input unreal money) feel free to change this number to a fair value that doesn't break UI or directly on the API call to prevent the call to be fired

enabled,
refetchInterval,
staleTime,
retry: 3,

Choose a reason for hiding this comment

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

magic number

Copy link
Author

Choose a reason for hiding this comment

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

This is indeed you might want to setup default retries on the queryclient config

options: Omit<FormatTokenOptions, 'tokenDecimals'> = {}
): string {
return formatTokenAmount(amount, 'ETH', {
decimals: 4, // Default to 4 decimals for ETH

Choose a reason for hiding this comment

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

magic number

Copy link
Author

Choose a reason for hiding this comment

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

This file comes from #811 so you guys want to address these on that PR first

): string {
return formatTokenAmount(amount, 'KARMA', {
...options,
tokenDecimals: 0, // KARMA values are already in display units

Choose a reason for hiding this comment

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

magic number

): string {
const {
currency = 'USD',
tokenDecimals = 0, // Default to 0 for currency values (already in display units)

Choose a reason for hiding this comment

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

magic number

Copy link

@JulesFiliot JulesFiliot left a comment

Choose a reason for hiding this comment

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

App is not building anymore due to mismatching types names

@github-project-automation github-project-automation bot moved this from In Progress to ToDo in Web & User Interfaces Oct 22, 2025
@github-project-automation github-project-automation bot moved this from ToDo to Waiting in Web & User Interfaces Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting

Development

Successfully merging this pull request may close these issues.

3 participants