Skip to content

feat(wallet-dashboard): collect vesting ptb#10912

Merged
brancoder merged 46 commits intofeature/sunset-vestingfrom
tooling-wallet/collect-vesting-ptb
Apr 9, 2026
Merged

feat(wallet-dashboard): collect vesting ptb#10912
brancoder merged 46 commits intofeature/sunset-vestingfrom
tooling-wallet/collect-vesting-ptb

Conversation

@evavirseda
Copy link
Copy Markdown
Member

@evavirseda evavirseda commented Mar 24, 2026

Description of change

example of collect transaction

  • Regular timelocks → unlock → convert to coin → transfer
  • Timelocked stakes → unlock first, then group by (pool_id, stake_activation_epoch) and merge with staking_pool::join_staked_iota
  • Unlocks before joining to avoid timelocked_staking::join_staked_iota, which also checks expiration_timestamp_ms and would abort for stakes from different vesting periods
  • If the user already has a regular stake in the same pool/epoch, merges into it instead of creating a new object
  • Shows a summary dialog after a successful collect

Links to any relevant issues

⚠️ nested PR from #10923

fixes #10800

How the change has been tested

  1. Get a vesting scenario
  2. Change SUPPLY_INCREASE_STARTING_VESTING_YEAR from 2023 to 2024 because the testing objects that you created expire in 2026, but the logic only considers staker up to 2025
  3. Wait a few minutes until all are unlocked

Testing Collect Transaction with Existing Stake Objects

To reproduce this scenario:

  • Run the vesting scenario from the tooling-resources repository.
  • In the same epoch, add regular stakes using the dashboard or wallet.
    ❗ Make sure that the validator is the same for timelocked staking (vesting fast example) and regular stake

This test ensures that the collect transaction correctly unlocks timelocked stake and adds it to the existing staking object in the pool

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

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

Project Deployment Actions Updated (UTC)
wallet-dashboard Ready Ready Preview, Comment Apr 9, 2026 9:09am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
apps-ui-kit Ignored Ignored Preview Apr 9, 2026 9:09am
apps-backend Skipped Skipped Apr 9, 2026 9:09am
iota-evm-bridge Skipped Skipped Apr 9, 2026 9:09am
iota-multisig-toolkit Skipped Skipped Apr 9, 2026 9:09am
rebased-explorer Skipped Skipped Apr 9, 2026 9:09am

Request Review

@github-actions github-actions bot added the wallet-dashboard Issues related to the Wallet Dashboard dApp label Mar 24, 2026
@iota-ci iota-ci added the tooling Issues related to the Tooling team label Mar 24, 2026
Copy link
Copy Markdown
Contributor

@brancoder brancoder left a comment

Choose a reason for hiding this comment

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

deduplicating code

Comment thread apps/core/src/utils/transaction/createUnlockTimelockedObjectsTransaction.ts Outdated
Copy link
Copy Markdown
Contributor

@brancoder brancoder left a comment

Choose a reason for hiding this comment

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

we should investigate the Collect transaction when there is a mismatch in networks between dashboard and wallet ex. dahsboard is on testnet and wallet is on devnet
this error is thrown in transaction approval window:

Image

@evavirseda
Copy link
Copy Markdown
Member Author

evavirseda commented Mar 30, 2026

we should investigate the Collect transaction when there is a mismatch in networks between dashboard and wallet ex. dahsboard is on testnet and wallet is on devnet
this error is thrown in transaction approval window:

we investigated this 🕵️
when dashboard on testnet sent a transaction to a wallet on devnet, the approval popup crashed 💥

the reason: it tried to look up testnet objects on devnet and those objects don’t exist there

evavirseda and others added 2 commits March 30, 2026 14:25
# Description of change


<details>
<summary>Screenshots 👀 </summary>

<img width="433" height="750" alt="Screenshot from 2026-03-20 10-02-09"
src="https://github.com/user-attachments/assets/4c557738-48dd-43dd-a32e-d6a5d007fea7"
/>
<img width="1081" height="548" alt="Screenshot from 2026-03-20 11-00-29"
src="https://github.com/user-attachments/assets/ea1a55ed-bada-47fd-ac6f-8a80703ccaaf"
/>
<img width="956" height="475" alt="Screenshot from 2026-03-20 11-00-48"
src="https://github.com/user-attachments/assets/0ec10edb-7b54-43ec-b2e3-989f7c7587ef"
/>
<img width="1194" height="708" alt="Screenshot from 2026-03-20 11-01-20"
src="https://github.com/user-attachments/assets/fbd93210-5d16-40d4-805f-4f44de660784"
/>

</details>

## Links to any relevant issues

fixes #10799

## How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any
relevant configurations.

---------

Co-authored-by: Mario Sarcevic <mario.sarcevic@iota.org>
brancoder
brancoder previously approved these changes Mar 31, 2026
Copy link
Copy Markdown
Contributor

@brancoder brancoder left a comment

Choose a reason for hiding this comment

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

LGTM 🥇

evavirseda and others added 2 commits April 1, 2026 16:41
# Description of change
<img width="1293" height="894" alt="image"
src="https://github.com/user-attachments/assets/e35679bc-3af6-49b6-813e-ef99d295d04c"
/>

## Links to any relevant issues

:warning: nested PR from #10912
fixes #10890

## How the change has been tested

To test this PR, you need to manually set up a validator on a local
network and turn it into inactive

---------

Co-authored-by: Bran <52735957+brancoder@users.noreply.github.com>
Comment thread apps/core/src/utils/transaction/createCollectAllTimelocksTransaction.ts Outdated
Comment thread apps/core/src/utils/transaction/createCollectAllTimelocksTransaction.ts Outdated
Comment thread apps/wallet-dashboard/components/dialogs/vesting/CollectSummaryDialog.tsx Outdated
Comment thread apps/wallet-dashboard/hooks/useGetSupplyIncreaseVestingObjects.ts Outdated
Comment thread apps/wallet-dashboard/hooks/useGetSupplyIncreaseVestingObjects.ts Outdated
Comment thread apps/wallet-dashboard/hooks/useGetSupplyIncreaseVestingObjects.ts
Copy link
Copy Markdown
Contributor

@brancoder brancoder left a comment

Choose a reason for hiding this comment

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

we could add link to explorer to Collect Summary and also check why summary doesn't display the unlocked objects and other details.
ex. tx : https://explorer.iota.org/txblock/4Mo7HvZCjkTo63Yit1M7Gm2XHAxVYzL7A82mFUzXdXmc?network=testnet
Colect summary 👇
Image

Comment thread apps/wallet-dashboard/hooks/useGetSupplyIncreaseVestingObjects.ts Outdated
Copy link
Copy Markdown
Contributor

@brancoder brancoder left a comment

Choose a reason for hiding this comment

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

we decided to show the standard Transaction Dialog instead Collect Summary Dialog

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can disable the Collect button while isSendingTransaction

const { mutateAsync: signAndExecuteTransaction, isPending: isSendingTransaction } =
        useSignAndExecuteTransaction();

Copy link
Copy Markdown
Contributor

@brancoder brancoder left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

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

Labels

tooling Issues related to the Tooling team wallet Issues related to the IOTA Wallet wallet-dashboard Issues related to the Wallet Dashboard dApp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sunset Vesting: Collect PTB

5 participants