Skip to content

feat: add hooks and provider for pre-deposit functionality#1073

Open
gbonumore wants to merge 4 commits intostatus-im:mainfrom
gbonumore:hub/allocate-funds
Open

feat: add hooks and provider for pre-deposit functionality#1073
gbonumore wants to merge 4 commits intostatus-im:mainfrom
gbonumore:hub/allocate-funds

Conversation

@gbonumore
Copy link
Copy Markdown
Contributor

@gbonumore gbonumore commented Mar 9, 2026

Solves #1034

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 9, 2026

⚠️ No Changeset found

Latest commit: 6beeae9

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
Copy Markdown

vercel bot commented Mar 9, 2026

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

A member of the Team first needs to authorize it.

# Conflicts:
#	apps/hub/src/app/_constants/chain.ts
#	apps/hub/src/app/_hooks/useApprovePreDepositToken.ts
#	apps/hub/src/app/_hooks/usePreDepositVault.ts
#	apps/hub/src/app/_hooks/useWrapETH.ts
@gbonumore gbonumore temporarily deployed to preview-deploy-approval March 9, 2026 20:59 — with GitHub Actions Inactive
@status-im-auto
Copy link
Copy Markdown
Member

status-im-auto commented Mar 9, 2026

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e74b84a 2 2026-03-09 21:00:16 ~45 sec connector 📦zip
✔️ e74b84a 2 2026-03-09 21:00:54 ~1 min wallet 📦zip

@gbonumore gbonumore had a problem deploying to preview-deploy-approval March 9, 2026 21:02 — with GitHub Actions Failure
@gbonumore
Copy link
Copy Markdown
Contributor Author

#1034 (comment)
In the end instead of patching the SDK I ended up making a lightweight hook using only viem to check for L1->L2 messages.
Let me know if that's okay or if there are any other questions.

@github-actions
Copy link
Copy Markdown
Contributor

Preview deployments are ready!

Project Status Preview
hub ✅ Ready Preview

Deployed via GitHub Actions

@jkbktl jkbktl requested review from a team, JulesFiliot, felicio, jinhojang6 and jkbktl March 13, 2026 13:19
Copy link
Copy Markdown
Collaborator

@jkbktl jkbktl left a comment

Choose a reason for hiding this comment

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

Great work 👏

I left couple of comments/flags to keep them in mind.

I appreciate change of the pre-deposit flow to be aligned with other flows, not sure if it's worth it since it's gonna end soon.

Could you please add to description what's done and what's missing? (I can see missing provide liquidity & lend mint flows, ens resolver...)

Comment thread apps/hub/messages/en.json
"notes": "vault::provide_liquidity"
},
"provide_liquidity_description": {
"translation": "Short description of the option. Pros and cons. Learn more.",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just flagging this, so it doesn't get into production.

Comment thread apps/hub/messages/en.json
"notes": "vault::lend_mint"
},
"lend_mint_description": {
"translation": "Short description of the option. Pros and cons. Learn more.",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same here. Flagging this, so it doesn't get into production.


const { status } = await waitForTransactionReceipt(config, {
hash,
chainId: statusSepolia.id,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Flagging to switch to hoodi once we migrate.

Comment on lines +75 to +76
l1ContractAddress: '0x508Ca82Df566dCD1B0DE8296e70a96332cD644ec',
l2ContractAddress: '0x508Ca82Df566dCD1B0DE8296e70a96332cD644ec',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is it same address for l1 and l2?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is definitely a mistake and they should match the same mainnet ones, thanks for spotting this

INITIAL: 0,
DEPOSITS: 1,
STRATEGY_WITHDRAWAL: 2,
BRIDGING: 3,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

BRIDGING is a declared vault state but the new CTA logic never handles it, so the card falls through to Coming soon during the bridge phase. (getVaultCardCta)

So if the contract itself reports BRIDGING as the vault state, this function does not match it anywhere.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks for spotting this it is indeed missing the BRIDGING state

@gbonumore gbonumore requested a deployment to preview-deploy-approval March 24, 2026 11:30 — with GitHub Actions Waiting
@gbonumore
Copy link
Copy Markdown
Contributor Author

Hey @jkbktl
There are still a bunch of things that need to be implemented:

  • ENS resolver
  • Learn more article to be linked on the UI
  • the options to pass in order to allocate funds instead of being withdrawn ( I was instructed to just prepare the flow and you guys can continue from this since these were still TBD) and the eventual redirect to external apps.

Let me know if I can support you in anything else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants