Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wallet-dashboard): add staking confirmation screen #4034

Closed
wants to merge 48 commits into from

Conversation

VmMad
Copy link
Member

@VmMad VmMad commented Nov 13, 2024

Fixes #3700

Depends on: #3832

@VmMad VmMad added tooling Issues related to the Tooling team wallet-dashboard Issues related to the Wallet Dashboard dApp labels Nov 13, 2024
@VmMad VmMad self-assigned this Nov 13, 2024
@VmMad VmMad requested review from a team as code owners November 13, 2024 13:37
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: fe7776a

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-m97x57bh5.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: fe7776a

✅ Preview: https://apps-ui-p06lurk6q-iota1.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: fe7776a

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-4uy3u6cht.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: fe7776a

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-dd4r5a55d.vercel.app

@VmMad VmMad linked an issue Nov 13, 2024 that may be closed by this pull request
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: c578109

✅ Preview: https://apps-ui-8eelvkc6t-iota1.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: c578109

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-1rqmzancc.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: c578109

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-dapzgko1u.vercel.app

@VmMad VmMad requested a review from cpl121 November 13, 2024 17:29
@VmMad VmMad changed the base branch from tooling-dashboard/style-stake-amount to tooling-dashboard/style-selected-stake November 14, 2024 14:29
@VmMad VmMad force-pushed the tooling-dashboard/style-confirmation-screen branch from c578109 to 1507c81 Compare November 14, 2024 14:43
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: ce38b84

✅ Preview: https://apps-ui-nlykh7dnd-iota1.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: ce38b84

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-5mm54ax1u.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: ce38b84

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-8jok503or.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: ce38b84

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-660nere3l.vercel.app

@VmMad VmMad requested a review from brancoder November 25, 2024 10:09
Base automatically changed from tooling-dashboard/style-selected-stake to develop November 25, 2024 16:20
Copy link
Member

@cpl121 cpl121 left a comment

Choose a reason for hiding this comment

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

conflicts 🙏🏼

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 24ea08c

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-ad5rw6a4z.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 24ea08c

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-6j384yf20.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 24ea08c

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-kh2cv1azy.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 8c14776

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-lmwne3qh4.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 8c14776

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-pgvtlb9xt.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 8c14776

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-fzruvuylf.vercel.app

@VmMad VmMad requested a review from cpl121 November 25, 2024 18:07
selectedValidator: selectedValidatorAddress,
onBack,
onStake,
gasBudget = 0,
handleClose,
validatorApy,
Copy link
Member

Choose a reason for hiding this comment

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

where is this used?

@@ -203,13 +201,14 @@ export function StakeDialog({
onNext={selectValidatorHandleNext}
/>
)}
{view === StakeDialogView.EnterAmount && (
{view === StakeDialogView.EnterAmount && validatorApy && (
Copy link
Member

Choose a reason for hiding this comment

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

If validatorApy is not needed, there is no need to put it here either

@@ -220,6 +219,18 @@ export function StakeDialog({
showActiveStatus
/>
)}
{view === StakeDialogView.TransactionDetails && (
Copy link
Member

Choose a reason for hiding this comment

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

just a comment: Why had you put it in the previous condition and not here?
... && validatorApy && (

Copy link
Member Author

Choose a reason for hiding this comment

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

right, cause there was no need for it to be always present, or it could be null

onSuccess(tx.digest);
}
onSuccess: () => {
setView?.(StakeDialogView.TransactionDetails);
Copy link
Member

Choose a reason for hiding this comment

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

why is setView optional in the props?

Copy link
Member Author

@VmMad VmMad Nov 26, 2024

Choose a reason for hiding this comment

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

Not sure, wasn't made by this PR. I know previously there was a component were this DIalog was used without passing the setView prop


import { IotaValidatorSummary } from '@iota/iota-sdk/client';

//TODO: verify this is the correct validator stake balance
Copy link
Member

Choose a reason for hiding this comment

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

comment unnecessary

Copy link
Member Author

Choose a reason for hiding this comment

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

this was in the code previously, are you sure we should delete it?

// SPDX-License-Identifier: Apache-2.0

export function formatApy(apy: number, isApyApproxZero: boolean = false): string {
return isApyApproxZero ? '~0%' : `${apy}%`;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return isApyApproxZero ? '~0%' : `${apy}%`;
return isApyApproxZero ? '~ 0%' : `${apy}%`;


<LayoutFooter>
<div className="flex w-full">
<Button type={ButtonType.Primary} fullWidth onClick={onConfirm} text="Finish" />
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<Button type={ButtonType.Primary} fullWidth onClick={onConfirm} text="Finish" />
<Button type={ButtonType.Primary} fullWidth onClick={onConfirm} text="Confirm & Exit" />

@VmMad VmMad requested a review from cpl121 November 26, 2024 10:26
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 026ee47

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-32clxuopb.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 026ee47

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-2vzmsu75b.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 026ee47

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-2rqveq56a.vercel.app

@begonaalvarezd
Copy link
Member

Im very sorry but the original issue was wrong and this PR is not needed 💔

@begonaalvarezd begonaalvarezd deleted the tooling-dashboard/style-confirmation-screen branch November 26, 2024 12:00
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-dashboard Issues related to the Wallet Dashboard dApp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style staking flow finish screen
7 participants