From f5250effc7c60800b66de2963fe4071602fbc2ad Mon Sep 17 00:00:00 2001 From: Polybius93 Date: Thu, 11 Jan 2024 08:50:56 +0100 Subject: [PATCH] feat: separates minting steps --- .../mint-unmint/components/mint/mint.tsx | 4 ++- .../progress-timeline/progress-timeline.tsx | 2 +- .../transaction-summary.tsx | 21 ++----------- .../components/walkthrough/walkthrough.tsx | 31 ++++++++++--------- .../components/my-vaults/my-vaults-large.tsx | 8 ++++- src/app/hooks/use-observer.ts | 8 +---- 6 files changed, 31 insertions(+), 43 deletions(-) diff --git a/src/app/components/mint-unmint/components/mint/mint.tsx b/src/app/components/mint-unmint/components/mint/mint.tsx index bfb9f09e..f7b3c174 100644 --- a/src/app/components/mint-unmint/components/mint/mint.tsx +++ b/src/app/components/mint-unmint/components/mint/mint.tsx @@ -20,7 +20,9 @@ export function Mint(): React.JSX.Element { {[0].includes(mintStep[0]) && } {[1].includes(mintStep[0]) && } - {[2].includes(mintStep[0]) && Wait 24 hours} + {[2].includes(mintStep[0]) && ( + + )} {[3].includes(mintStep[0]) && ( )} diff --git a/src/app/components/mint-unmint/components/progress-timeline/progress-timeline.tsx b/src/app/components/mint-unmint/components/progress-timeline/progress-timeline.tsx index c3d29303..37d74e2b 100644 --- a/src/app/components/mint-unmint/components/progress-timeline/progress-timeline.tsx +++ b/src/app/components/mint-unmint/components/progress-timeline/progress-timeline.tsx @@ -57,7 +57,7 @@ export function ProgressTimeline({ isFirstStep /> - + vault.uuid === currentStep[1]); const showProcessing = - (flow === 'mint' && currentStep[0] === 3) || (flow === 'unmint' && currentStep[0] === 2); + (flow === 'mint' && currentStep[0] === 2) || (flow === 'unmint' && currentStep[0] === 2); return ( @@ -61,17 +57,6 @@ export function TransactionSummary({ {flowPropertyMap[flow][currentStep[0]].title}: - {showProcessing && ( - <> - - b) {flowPropertyMap[flow][currentStep[0]].subtitle}: - - - - )} View vault statuses in the My Vaults tab. diff --git a/src/app/components/mint-unmint/components/walkthrough/walkthrough.tsx b/src/app/components/mint-unmint/components/walkthrough/walkthrough.tsx index ae19a57a..1ef4f9c5 100644 --- a/src/app/components/mint-unmint/components/walkthrough/walkthrough.tsx +++ b/src/app/components/mint-unmint/components/walkthrough/walkthrough.tsx @@ -72,11 +72,20 @@ export function Walkthrough({ flow, currentStep }: WalkthroughProps): React.JSX. - - Waiting....... + + Wait until Bitcoin is locked on-chain and all other validation checks have been + processed{' '} + + (~1 hour) + ); @@ -85,20 +94,12 @@ export function Walkthrough({ flow, currentStep }: WalkthroughProps): React.JSX. - Wait for Bitcoin to get locked on chain{' '} - - (~1 hour) - - . After 6 confirmations, dlcBTC tokens will appear in your Ethereum Wallet. + Your request is validated and you have successfully minted a{' '} + dlcBTC token. To ensure your dlcBTC tokens diff --git a/src/app/components/my-vaults/my-vaults-large.tsx b/src/app/components/my-vaults/my-vaults-large.tsx index 574ae6f7..25ad68d3 100644 --- a/src/app/components/my-vaults/my-vaults-large.tsx +++ b/src/app/components/my-vaults/my-vaults-large.tsx @@ -29,7 +29,13 @@ export function MyVaultsLarge(): React.JSX.Element { /> {address ? ( - + 0 + } + > diff --git a/src/app/hooks/use-observer.ts b/src/app/hooks/use-observer.ts index 0b3bb9d0..ec747f52 100644 --- a/src/app/hooks/use-observer.ts +++ b/src/app/hooks/use-observer.ts @@ -58,13 +58,7 @@ export function useObserver(ethereum: UseEthereumReturnType): void { console.log(`Vault ${vaultUUID} is minted`); await getVault(vaultUUID, VaultState.FUNDED).then(() => { - dispatch(mintUnmintActions.setMintStep([0, vaultUUID])); - dispatch( - modalActions.toggleSuccessfulFlowModalVisibility({ - flow: 'mint', - vaultUUID, - }) - ); + dispatch(mintUnmintActions.setMintStep([3, vaultUUID])); }); });