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

@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

🦋 Changeset detected

Latest commit: dbfbbf7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
hub Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another 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(', ')
Copy link
Contributor

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
Contributor

@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)
Copy link
Contributor

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,
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

magic number

Copy link
Contributor

@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
@jinhojang6
Copy link
Contributor

jinhojang6 commented Oct 27, 2025

I can't build this branch yet with the following error:

wallet:build:  ERROR  [vite:define] The service was stopped: write EPIPE                                                                                
wallet:build:  ELIFECYCLE  Command failed with exit code 1.
wallet:build:  ELIFECYCLE  Command failed with exit code 1.
...
status.app#build: command (/Users/.../status-web/apps/status.app) /Users/jinhojang/Library/pnpm/.tools/@pnpm+macos-arm64/9.12.3/bin/pnpm run build exited (1)

@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
status-network-hub Ready Ready Preview Comment Oct 29, 2025 1:39pm

@JulesFiliot
Copy link
Contributor

I can't build this branch yet with the following error:

wallet:build:  ERROR  [vite:define] The service was stopped: write EPIPE                                                                                
wallet:build:  ELIFECYCLE  Command failed with exit code 1.
wallet:build:  ELIFECYCLE  Command failed with exit code 1.
...
status.app#build: command (/Users/.../status-web/apps/status.app) /Users/jinhojang/Library/pnpm/.tools/@pnpm+macos-arm64/9.12.3/bin/pnpm run build exited (1)

@jinhojang6 at the root this should work:

nvm use 20 && pnpm install && pnpm build
# even if the status.app & wallet builds fail, the command bellow should then work correctly
pnpm --filter "hub" dev

After that you can also check that the build of the hub passes by doing

pnpm -r --filter "...hub" build

@jinhojang6
Copy link
Contributor

jinhojang6 commented Oct 31, 2025

@JulesFiliot

I ran nvm use 20 && pnpm install && pnpm build but got the same error.

wallet:build:  ERROR  [vite:esbuild] The service was stopped                                                                                            5:41:55 PM
wallet:build: file: /Users/jinhojang/Desktop/work/status-web/apps/wallet/src/data/bitcoin/mempool.ts

...

wallet:build:  ERROR  Failed to build background, page                                                                                                  5:41:55 PM
wallet:build: 
wallet:build:     at buildEntrypoints
...

The build process itself is not working, although I retried it after removing node_modules.

But pnpm --filter "hub" dev definitely works

"clean": "rimraf .next .vercel/output node_modules"
},
"dependencies": {
"@radix-ui/react-dialog": "^1.1.1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jkbktl jkbktl changed the base branch from feat/wallet-connect to main November 5, 2025 11:45
gbonumore and others added 5 commits November 5, 2025 13:47
- 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.
@jkbktl jkbktl force-pushed the feat/add-deposit-section branch from 67e527e to 15d2620 Compare November 5, 2025 12:53
@jkbktl jkbktl changed the base branch from main to release/hub November 5, 2025 12:55
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.

add deposit section

6 participants