-
Notifications
You must be signed in to change notification settings - Fork 16
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): style enter amount for staking #3874
feat(wallet-dashboard): style enter amount for staking #3874
Conversation
This pull request has been deployed to Vercel. Latest commit: 9f047e0 ✅ Preview: https://apps-ui-phvw928eh-iota1.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 9f047e0 ✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-jfq3r6npz.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 9f047e0 ✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-dhheugala.vercel.app |
…tional rendering in StakeTxnInfo
This pull request has been deployed to Vercel. Latest commit: 5f537d1 ✅ Preview: https://apps-ui-97e6agvp3-iota1.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 5f537d1 ✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-muvb6iljb.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 5f537d1 ✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-398rvftbg.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 5f537d1 ✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-i7j6t6mjv.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 33e3089 ✅ Preview: https://apps-ui-494uklq9x-iota1.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 33e3089 ✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-l6r14fnjk.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 33e3089 ✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-4bi2u34qd.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 33e3089 ✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-nrglzc6ok.vercel.app |
/> | ||
)} | ||
{step === Step.EnterAmount && ( | ||
<EnterAmountView | ||
selectedValidator={selectedValidator} | ||
amount={amount} | ||
gasBudget={newStakeData?.gasBudget} | ||
onChange={(e) => setAmount(e.target.value)} | ||
onBack={handleBack} | ||
onStake={handleStake} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could close the dialog if everything goes well, at least until the tx details screen is done
<Header title={title[step]} onClose={() => setOpen(false)} /> | ||
<Header | ||
title={title[step]} | ||
onClose={() => setOpen(false)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should reset the selected validator too when closing the dialog
const { name, commission, newValidator, isAtRisk, apy, isApyApproxZero } = | ||
useValidatorInfo(validatorAddress); | ||
const { name, commission, newValidator, isAtRisk, apy, isApyApproxZero } = useValidatorInfo({ | ||
validatorAddress: validatorAddress, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validatorAddress: validatorAddress, | |
validatorAddress, |
@@ -89,7 +90,7 @@ export function StakedDetailsDialog({ | |||
} | |||
|
|||
function handleAddNewStake() { | |||
console.log('Stake'); | |||
// pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not open the dialog to make a new stake here?
// Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
export function useSelectValidator() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we using this hook?
@@ -2,3 +2,4 @@ | |||
// SPDX-License-Identifier: Apache-2.0 | |||
|
|||
export { default as StakeDialog } from './StakeDialog'; | |||
export * from './StakedDetailsDialog'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export * from './StakedDetailsDialog'; | |
export { default as StakedDetailsDialog } from './StakedDetailsDialog'; |
to follow the same format, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should keep this with the * as we agreed
7d16bd2
to
dc319da
Compare
dc319da
to
f7c2c6f
Compare
For decrease dependencies, changes for this PR added in the #3832 All commnets fixed |
Description of change
Please write a summary of your changes and why you made them.
Links to any relevant issues
Closes: #3699
Type of change
Choose a type of change, and delete any options that are not relevant.
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.
Change checklist
Tick the boxes that are relevant to your changes, and delete any items that are not.