diff --git a/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte b/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte
index 730de82d478..be417f388d9 100644
--- a/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte
+++ b/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte
@@ -8,31 +8,44 @@
import { Icon } from '$components/Icon';
import { uid } from '$libs/util/uid';
+ enum State {
+ Valid = 'valid',
+ Invalid = 'invalid',
+ TooShort = 'too_short',
+ }
+
let input: HTMLInputElement;
let inputId = `input-${uid()}`;
- let showAlert = true;
+ let state: State;
export let ethereumAddress: Address | string = '';
- let isValidEthereumAddress = false;
- let tooShort = true;
const dispatch = createEventDispatcher();
const validateEthereumAddress = (address: string | EventTarget | null) => {
+ let addr: string;
+
if (address && address instanceof EventTarget) {
- address = (address as HTMLInputElement).value;
+ addr = (address as HTMLInputElement).value;
+ } else {
+ addr = address as string;
+ }
+ if (addr.length >= 2 && !addr.startsWith('0x')) {
+ state = State.Invalid;
+ return;
}
-
- const addr = address as string;
if (addr.length < 42) {
- tooShort = true;
- isValidEthereumAddress = false;
+ state = State.TooShort;
} else {
- tooShort = false;
- isValidEthereumAddress = isAddress(addr);
+ if (isAddress(addr)) {
+ state = State.Valid;
+ } else {
+ state = State.Invalid;
+ }
dispatch('input', addr);
}
- dispatch('addressvalidation', { isValidEthereumAddress, addr });
+
+ dispatch('addressvalidation', { isValidEthereumAddress: state === State.Valid, addr });
};
$: validateEthereumAddress(ethereumAddress);
@@ -49,7 +62,7 @@
{$t('inputs.address_input.label')}
-
-
- {#if !isValidEthereumAddress && !tooShort}
+
+ {#if state === State.Invalid && ethereumAddress}
- {:else if isValidEthereumAddress && !tooShort && showAlert}
+ {:else if state === State.TooShort && ethereumAddress}
+
+ {:else if state === State.Valid}
{/if}
diff --git a/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte b/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte
index 0f128a0cdd0..ca2c0071e01 100644
--- a/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte
+++ b/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte
@@ -185,7 +185,7 @@
// There is no reason to show any error/warning message if we are computing the balance
// or there is an issue computing it
- $: showInsifficientBalanceAlert = $insufficientBalance && !$errorComputingBalance && !$computingBalance;
+ $: showInsufficientBalanceAlert = $insufficientBalance && !$errorComputingBalance && !$computingBalance;
$: showInsiffucientAllowanceAlert = $insufficientAllowance && !$errorComputingBalance && !$computingBalance;
@@ -229,7 +229,7 @@
{$t('inputs.amount.button.max')}
- {#if showInsifficientBalanceAlert}
+ {#if showInsufficientBalanceAlert}
{:else if showInsiffucientAllowanceAlert}
diff --git a/packages/bridge-ui-v2/src/components/Bridge/Recipient.svelte b/packages/bridge-ui-v2/src/components/Bridge/Recipient.svelte
index 7112ae559fd..d8d9c16dca4 100644
--- a/packages/bridge-ui-v2/src/components/Bridge/Recipient.svelte
+++ b/packages/bridge-ui-v2/src/components/Bridge/Recipient.svelte
@@ -74,7 +74,7 @@
{#if displayedRecipient}
{shortenAddress(displayedRecipient, 15, 13)}
- {$recipientAddress === $account?.address ? '' : '| Customized'}
+ {$recipientAddress !== $account?.address ? '' : '| Customized'}
{:else}
{$t('recipient.placeholder')}
{/if}
diff --git a/packages/bridge-ui-v2/src/components/ChainSelector/ChainSelector.svelte b/packages/bridge-ui-v2/src/components/ChainSelector/ChainSelector.svelte
index 43abc515faf..114c18e6cc9 100644
--- a/packages/bridge-ui-v2/src/components/ChainSelector/ChainSelector.svelte
+++ b/packages/bridge-ui-v2/src/components/ChainSelector/ChainSelector.svelte
@@ -22,11 +22,11 @@
let classes = classNames('ChainSelector', $$props.class);
let buttonClasses = classNames(
'body-regular bg-neutral-background',
- small ? 'px-2 py-[6px]' : 'px-6 py-[10px]',
+ small ? 'px-2 py-[6px]' : 'px-[24px] py-[10px]',
small ? 'rounded-md' : 'rounded-[10px]',
small ? 'w-auto' : 'w-full',
readOnly ? '' : 'dark:hover:bg-tertiary-interactive-hover',
- 'flex justify-start content-center body-bold py-2 px-[20px]',
+ 'flex justify-start content-center',
);
let switchingNetwork = false;
@@ -109,7 +109,7 @@
{/if}
{#if value}
-
+
{value.name}
{/if}
diff --git a/packages/bridge-ui-v2/src/components/ConnectButton/ConnectButton.svelte b/packages/bridge-ui-v2/src/components/ConnectButton/ConnectButton.svelte
index 3bdf830ac18..46e565ddef5 100644
--- a/packages/bridge-ui-v2/src/components/ConnectButton/ConnectButton.svelte
+++ b/packages/bridge-ui-v2/src/components/ConnectButton/ConnectButton.svelte
@@ -43,7 +43,7 @@
https://docs.walletconnect.com/2.0/web/web3modal/html/wagmi/components
-->
{#if connected}
-
+
{renderBalance($ethBalance)}
diff --git a/packages/bridge-ui-v2/src/components/Icon/ETH.svelte b/packages/bridge-ui-v2/src/components/Icon/ETH.svelte
index 543dbc7f96f..5071ca5a9a0 100644
--- a/packages/bridge-ui-v2/src/components/Icon/ETH.svelte
+++ b/packages/bridge-ui-v2/src/components/Icon/ETH.svelte
@@ -1,26 +1,26 @@
-
-
-
-
-
-
-
-
+ preserveAspectRatio="xMinYMin meet">
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/bridge-ui-v2/src/components/Icon/Taiko.svelte b/packages/bridge-ui-v2/src/components/Icon/Taiko.svelte
index d6de14dd2ea..1a54d785efe 100644
--- a/packages/bridge-ui-v2/src/components/Icon/Taiko.svelte
+++ b/packages/bridge-ui-v2/src/components/Icon/Taiko.svelte
@@ -1,12 +1,23 @@
-
-
-
+
+
+
+
+
diff --git a/packages/bridge-ui-v2/src/i18n/en.json b/packages/bridge-ui-v2/src/i18n/en.json
index a36980cdb1e..e5014f327c9 100644
--- a/packages/bridge-ui-v2/src/i18n/en.json
+++ b/packages/bridge-ui-v2/src/i18n/en.json
@@ -191,7 +191,8 @@
"label": "Address",
"placeholder": "Enter an address",
"errors": {
- "invalid": "Invalid address format"
+ "invalid": "Invalid address format",
+ "too_short": "Address length is too short"
},
"success": "Valid address format"
},
diff --git a/packages/bridge-ui-v2/src/libs/connect/web3modal.ts b/packages/bridge-ui-v2/src/libs/connect/web3modal.ts
index 33334d98f6b..7855266ded2 100644
--- a/packages/bridge-ui-v2/src/libs/connect/web3modal.ts
+++ b/packages/bridge-ui-v2/src/libs/connect/web3modal.ts
@@ -20,11 +20,6 @@ export const web3modal = new Web3Modal(
themeVariables: {
'--w3m-font-family': '"Public Sans", sans-serif',
'--w3m-font-feature-settings': 'normal',
-
- // button background-color
- '--w3m-accent-color': 'var(--neutral-background)',
- '--w3m-accent-fill-color': 'hsl(var(--nc) / var(--tw-text-opacity))', // grey-10
-
'--w3m-button-border-radius': '9999px',
// Body small regular
@@ -48,17 +43,13 @@ export const web3modal = new Web3Modal(
'--w3m-background-border-radius': '20px',
'--w3m-container-border-radius': '0',
- // TODO: customize the rest of the theme variables
-
// Unofficial variables
// @ts-ignore
'--w3m-color-fg-1': 'var(--primary-content)',
- // '--w3m-color-fg-2': '',
- // '--w3m-color-fg-3': '',
'--w3m-color-bg-1': 'var(--primary-background)',
'--w3m-color-bg-2': 'var(--neutral-background)',
- // '--w3m-color-bg-3': '',
'--w3m-color-overlay': 'none',
+ '--w3m-accent-color': 'var(--neutral-background)',
},
themeMode: (localStorage.getItem('theme') as 'dark' | 'light') ?? 'dark',
},
diff --git a/packages/bridge-ui-v2/src/styles/base.css b/packages/bridge-ui-v2/src/styles/base.css
index 4291493a354..bfe4862a47d 100644
--- a/packages/bridge-ui-v2/src/styles/base.css
+++ b/packages/bridge-ui-v2/src/styles/base.css
@@ -20,22 +20,31 @@
}
body {
- /* No grid background by default */
height: 100%;
+ }
+
+ body::before {
+ content: '';
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
background-image: url(/bg/grid.svg), url(/bg/spotlights.svg), linear-gradient(270deg, #1f1f1f 0%, #000000 100%);
+ /* No grid background by default */
background-size: 0, cover, cover;
background-blend-mode: color-dodge, lighten, multiply;
- background-attachment: fixed;
+ z-index: -1;
}
@media (min-width: 768px) {
- body {
+ body::before {
background-size: 700px, cover, cover;
}
}
/* In light mode there is no background image */
- [data-theme='light'] body {
+ [data-theme='light'] body::before {
background-image: none;
}
}
diff --git a/packages/bridge-ui-v2/src/styles/components.css b/packages/bridge-ui-v2/src/styles/components.css
index ffab1c62969..f4dc880cd93 100644
--- a/packages/bridge-ui-v2/src/styles/components.css
+++ b/packages/bridge-ui-v2/src/styles/components.css
@@ -86,8 +86,17 @@
focus:!shadow-[0_0_0_3px_#E81899];
}
+ .input-box.withValdiation {
+ @apply outline-none;
+ }
+
.input-box.error {
- @apply !shadow-[0_0_0_3px_#F15C5D];
+ @apply !shadow;
+ box-shadow: 0 0 0 3px var(--negative-sentiment) !important;
+ }
+
+ .input-box.success {
+ box-shadow: 0 0 0 3px var(--positive-sentiment) !important;
}
/* Tooltip */