From eb6117f70d359219be82fa3164b33153b963bf1d Mon Sep 17 00:00:00 2001 From: borcherd Date: Wed, 27 Nov 2024 21:26:37 +0530 Subject: [PATCH] chore: stake-screen updates --- .../action-complete/screens/stake-screen.tsx | 48 ++++++++++++++++--- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/packages/mrgn-ui/src/components/action-complete/screens/stake-screen.tsx b/packages/mrgn-ui/src/components/action-complete/screens/stake-screen.tsx index 30b847e56b..4ffde89d71 100644 --- a/packages/mrgn-ui/src/components/action-complete/screens/stake-screen.tsx +++ b/packages/mrgn-ui/src/components/action-complete/screens/stake-screen.tsx @@ -1,5 +1,7 @@ import React from "react"; import Link from "next/link"; +import Image from "next/image"; + import { IconExternalLink } from "@tabler/icons-react"; import { ActionType, ExtendedBankInfo } from "@mrgnlabs/marginfi-v2-ui-state"; @@ -21,18 +23,50 @@ interface Props { export const StakingScreen = ({ amount, type, txn, originDetails, txnLink }: Props) => { return ( <> -
-
-

- {dynamicNumeralFormatter(amount)} {type === ActionType.MintLST ? "LST" : "SOL"} -

- {type === ActionType.MintLST ? : } +
+
+ {(originDetails.bank.meta.tokenLogoUri + {type === ActionType.MintLST ? ( + + ) : ( + + )}
+

+ {/* {dynamicNumeralFormatter(amount)} {type === ActionType.MintLST ? "LST" : "SOL"} */} + {type === ActionType.MintLST + ? `You staked ${dynamicNumeralFormatter(originDetails.amount, { + minDisplay: 0.01, + })} ${originDetails.bank.meta.tokenSymbol.toUpperCase()} for ${dynamicNumeralFormatter(amount, { + minDisplay: 0.01, + })} LST` + : `You swapped ${dynamicNumeralFormatter(originDetails.amount, { + minDisplay: 0.01, + })} LST for ${dynamicNumeralFormatter(amount, { + minDisplay: 0.01, + })} SOL`} +

Paid
- {dynamicNumeralFormatter(originDetails?.amount)} {originDetails?.bank.meta.tokenSymbol} + {dynamicNumeralFormatter(originDetails?.amount, { + minDisplay: 0.01, + })}{" "} + {originDetails?.bank.meta.tokenSymbol} +
+
Received
+
+ {dynamicNumeralFormatter(amount, { + minDisplay: 0.01, + })}{" "} + {type === ActionType.MintLST ? "LST" : "SOL"}
Transaction