Skip to content

Commit

Permalink
fix send from empty wallet (#531)
Browse files Browse the repository at this point in the history
* fix send from empty wallet

* balance ui: only show dot when tere are decimals
  • Loading branch information
bordalix authored Mar 4, 2024
1 parent 2e3dfab commit c6aedc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/extension/components/balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ const Balance: React.FC<Props> = ({
const [integer, decimals] = assetBalance.split('.');
return (
<>
<span className="font-medium">{integer}.</span>
<span className="font-light">{decimals} </span>
<span className="font-medium">{assetTicker}</span>
<span className="font-medium">{integer}</span>
{decimals ? <span className="font-light">.{decimals}</span> : null}
<span className="font-medium"> {assetTicker}</span>
</>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/extension/wallet/send/address-amount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const AddressAmountView: React.FC = () => {
className="h-popupContent container pb-20 mx-auto text-center bg-bottom bg-no-repeat"
currentPage="Send"
>
{!isInitializingFormState && sendAsset && cache?.balances.value[sendAsset.assetHash] && (
{!isInitializingFormState && sendAsset && (
<>
<Balance
assetHash={sendAsset.assetHash}
Expand Down

0 comments on commit c6aedc1

Please sign in to comment.