Skip to content

Commit

Permalink
[Wallet]: add info to input section (MystenLabs#14619)
Browse files Browse the repository at this point in the history
## Description 

- Add info to input section

<img width="570" alt="Screenshot 2023-11-01 at 8 42 10 PM"
src="https://github.com/MystenLabs/sui/assets/127577476/7a317464-21d4-49e6-b820-e744ecd796bd">

<img width="581" alt="Screenshot 2023-11-01 at 9 21 49 PM"
src="https://github.com/MystenLabs/sui/assets/127577476/52662e94-cbe2-4692-a155-cb50da3d935a">


## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
plam-ml authored Nov 2, 2023
1 parent 04d1bdb commit 2f470a8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
12 changes: 7 additions & 5 deletions apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ export function TokenRow({
{coinMeta?.name || symbol}
</Text>

<div className="group-hover:hidden">
<Text variant="subtitle" color="steel-dark" weight="medium">
{symbol}
</Text>
</div>
{renderActions && (
<div className="group-hover:hidden">
<Text variant="subtitle" color="steel-dark" weight="medium">
{symbol}
</Text>
</div>
)}

{renderActions ? (
<div className="group-hover:flex hidden gap-2.5 items-center">
Expand Down
9 changes: 8 additions & 1 deletion apps/wallet/src/ui/app/pages/swap/ToAssetSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '_pages/swap/constants';
import { MaxSlippage, MaxSlippageModal } from '_pages/swap/MaxSlippage';
import { ToAssets } from '_pages/swap/ToAssets';
import { useSwapData } from '_pages/swap/utils';
import { getUSDCurrency, useSwapData } from '_pages/swap/utils';
import { useDeepBookContext } from '_shared/deepBook/context';
import { type BalanceChange } from '@mysten/sui.js/client';
import { SUI_TYPE_ARG } from '@mysten/sui.js/utils';
Expand Down Expand Up @@ -116,6 +116,13 @@ export function ToAssetSection({
</Text>
)
}
info={
isValid && (
<Text variant="subtitleSmall" color="steel-dark">
{getUSDCurrency(isAsk ? toAssetAmountAsNum : Number(amount))}
</Text>
)
}
/>

{isValid && toAssetAmountAsNum && amount ? (
Expand Down

0 comments on commit 2f470a8

Please sign in to comment.