Skip to content

Commit

Permalink
Merge branch 'dev' into feat/check-allowance-before-approve
Browse files Browse the repository at this point in the history
  • Loading branch information
bayological committed Nov 27, 2024
2 parents fb112de + 1f6f868 commit 6e509c7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mento-protocol/mento-web",
"version": "2.3.0",
"version": "2.3.1",
"description": "A simple DApp for Celo Mento exchanges",
"keywords": [
"Celo",
Expand Down
10 changes: 8 additions & 2 deletions src/components/nav/BalancesSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ export function BalancesSummary() {
{tokenIds.map((id) => {
const balance = fromWeiRounded(balances[id], Tokens[id].decimals)
if (balance !== '0') {
const token = Tokens[id]
// TODO: @bayo Either revert this !== 0 check or add some animation for when balances are loading
return (
<div style={{ minWidth: '35%' }} className="flex pb-4 dark:text-white" key={id}>
<TokenIcon token={Tokens[id]} size="xs" />
<div
style={{ minWidth: '35%' }}
className="flex pb-4 dark:text-white"
key={id}
data-testid={`walletSettings_${token.id}_balance`}
>
<TokenIcon token={token} size="xs" />
<div className="ml-3">{balance}</div>
</div>
)
Expand Down
16 changes: 13 additions & 3 deletions src/components/nav/NetworkModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface Props {
}

export function NetworkModal({ isOpen, close }: Props) {
const baseLocator = 'networkModal'
const latestBlock = useAppSelector((s) => s.block.latestBlock)
const chainId = useChainId()
const currentChain = chainIdToChain[chainId]
Expand Down Expand Up @@ -46,7 +47,10 @@ export function NetworkModal({ isOpen, close }: Props) {
<div className="text-neutral-500 dark:text-gray-400 text-[14px] sm:text-[15px] font-normal leading-tight">
Connected to:
</div>
<div className="opacity-90 text-right text-gray-950 dark:text-white text-[15px] font-medium leading-tight">
<div
className="opacity-90 text-right text-gray-950 dark:text-white text-[15px] font-medium leading-tight"
data-testid={`${baseLocator}_currentNetwork`}
>
{currentChain?.name || 'Unknown'}
</div>
</div>
Expand All @@ -55,7 +59,10 @@ export function NetworkModal({ isOpen, close }: Props) {
<div className="text-neutral-500 dark:text-gray-400 text-[14px] sm:text-[15px] font-normal leading-tight">
Block Number:
</div>
<div className="opacity-90 text-right text-gray-950 dark:text-white text-[14px] sm:text-[15px] font-medium leading-tight">
<div
className="opacity-90 text-right text-gray-950 dark:text-white text-[14px] sm:text-[15px] font-medium leading-tight"
data-testid={`${baseLocator}_currentBlockNumber`}
>
{latestBlock?.number || 'Unknown'}
</div>
</div>
Expand All @@ -64,7 +71,10 @@ export function NetworkModal({ isOpen, close }: Props) {
<div className="text-neutral-500 dark:text-gray-400 text-[14px] sm:text-[15px] font-normal leading-tight">
Node Rpc Url:
</div>
<div className="opacity-90 text-right text-gray-950 dark:text-white text-[14px] sm:text-[15px] font-medium leading-tight">
<div
className="opacity-90 text-right text-gray-950 dark:text-white text-[14px] sm:text-[15px] font-medium leading-tight"
data-testid={`${baseLocator}_currentNodeRpcUrl`}
>
{shortenUrl(currentChain?.rpcUrl) || 'Unknown'}
</div>
</div>
Expand Down

0 comments on commit 6e509c7

Please sign in to comment.