Skip to content

Commit

Permalink
feat: update WsolDeposit component to conditionally render alert and …
Browse files Browse the repository at this point in the history
…add delay for transaction processing
  • Loading branch information
mohandast52 committed Nov 6, 2024
1 parent 55ed503 commit 734272c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const WsolDeposit = () => {
</Form.Item>
</Form>

{quoteLiquidity && (
{quoteLiquidity ? (
<Alert
message={
<>
Expand All @@ -172,7 +172,7 @@ export const WsolDeposit = () => {
type="success"
showIcon
/>
)}
) : null}
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ export const useWsolDeposit = () => {
return null;
}

// wait for 2 seconds to allow the transaction to be processed
await new Promise((resolve) => setTimeout(resolve, 2000));
await getLatestBridgeTokenAmount(); // refetch bridged token amount

return quote.liquidityAmount.toString();
Expand Down

0 comments on commit 734272c

Please sign in to comment.