+
Validator Name: {validatorInfo.name}
+
Validator Address: {delegatedStake.validatorAddress}
+
Stake Request Epoch: {delegatedStake.stakeRequestEpoch}
+
Rewards: {validatorInfo.rewardsPool}
+
Total Stakes: {delegatedStake.stakes.length}
+ {delegatedStake.stakes.map((stake, index) => {
+ return (
+
+
+ Stake {index + 1}: {stake.timelockedStakedIotaId}
+
+ Expiration time: {stake.expirationTimestampMs}
+ Label: {stake.label}
+ Status: {stake.status}
+
+ );
+ })}
+
Gas Fees: {timelockedUnstake?.gasBudget?.toString() || '--'}
+ {isPending ? (
+
+ ) : (
+
+ )}
+
+ );
+}
+
+export default TimelockedUnstakePopup;
diff --git a/apps/wallet-dashboard/components/Popup/Popups/VestingPopup/index.ts b/apps/wallet-dashboard/components/Popup/Popups/VestingPopup/index.ts
new file mode 100644
index 00000000000..2a8ca3b61df
--- /dev/null
+++ b/apps/wallet-dashboard/components/Popup/Popups/VestingPopup/index.ts
@@ -0,0 +1,4 @@
+// Copyright (c) 2024 IOTA Stiftung
+// SPDX-License-Identifier: Apache-2.0
+
+export { default as TimelockedUnstakePopup } from './TimelockedUnstakePopup';
diff --git a/apps/wallet-dashboard/components/Popup/Popups/index.ts b/apps/wallet-dashboard/components/Popup/Popups/index.ts
index 9388fb78536..095ffa1220a 100644
--- a/apps/wallet-dashboard/components/Popup/Popups/index.ts
+++ b/apps/wallet-dashboard/components/Popup/Popups/index.ts
@@ -9,4 +9,5 @@ export { default as SendCoinPopup } from './SendCoinPopup/SendCoinPopup';
export { default as SendAssetPopup } from './SendAssetPopup';
export * from './SendCoinPopup';
+export * from './VestingPopup';
export * from './NewStakePopup';
diff --git a/apps/wallet-dashboard/hooks/index.ts b/apps/wallet-dashboard/hooks/index.ts
index d331f08a80d..07ccfe796f8 100644
--- a/apps/wallet-dashboard/hooks/index.ts
+++ b/apps/wallet-dashboard/hooks/index.ts
@@ -8,3 +8,4 @@ export * from './useNotifications';
export * from './useSendCoinTransaction';
export * from './useCreateSendAssetTransaction';
export * from './useGetCurrentEpochStartTimestamp';
+export * from './useTimelockedUnstakeTransaction';
diff --git a/apps/wallet-dashboard/hooks/useTimelockedUnstakeTransaction.ts b/apps/wallet-dashboard/hooks/useTimelockedUnstakeTransaction.ts
new file mode 100644
index 00000000000..c7d1152e2da
--- /dev/null
+++ b/apps/wallet-dashboard/hooks/useTimelockedUnstakeTransaction.ts
@@ -0,0 +1,31 @@
+// Copyright (c) 2024 IOTA Stiftung
+// SPDX-License-Identifier: Apache-2.0
+
+import { createTimelockedUnstakeTransaction } from '@iota/core';
+import { useIotaClient } from '@iota/dapp-kit';
+import { useQuery } from '@tanstack/react-query';
+
+export function useTimelockedUnstakeTransaction(
+ timelockedStakedObjectIds: string[],
+ senderAddress: string,
+) {
+ const client = useIotaClient();
+ return useQuery({
+ // eslint-disable-next-line @tanstack/query/exhaustive-deps
+ queryKey: ['timelocked-unstake-transaction', timelockedStakedObjectIds, senderAddress],
+ queryFn: async () => {
+ const transaction = createTimelockedUnstakeTransaction(timelockedStakedObjectIds);
+ transaction.setSender(senderAddress);
+ await transaction.build({ client });
+ return transaction;
+ },
+ enabled: !!timelockedStakedObjectIds && !!senderAddress,
+ gcTime: 0,
+ select: (transaction) => {
+ return {
+ transaction,
+ gasBudget: transaction.blockData.gasConfig.budget,
+ };
+ },
+ });
+}