Skip to content

Commit 6c9c8f4

Browse files
committed
chore: add SOL native token to isNativeAddress
1 parent b49da40 commit 6c9c8f4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ui/pages/bridge/prepare/bridge-input-group.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export const BridgeInputGroup = ({
147147
inputRef={inputRef}
148148
type={TextFieldType.Text}
149149
className="amount-input"
150-
placeholder={'0'}
150+
placeholder="0"
151151
onKeyPress={(e?: React.KeyboardEvent<HTMLDivElement>) => {
152152
if (e) {
153153
// Only allow numbers and at most one decimal point

ui/pages/bridge/utils/quote.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Numeric } from '../../../../shared/modules/Numeric';
1616
import { EtherDenomination } from '../../../../shared/constants/common';
1717
import { DEFAULT_PRECISION } from '../../../hooks/useCurrencyDisplay';
1818
import { formatAmount } from '../../confirmations/components/simulation-details/formatAmount';
19+
import { MULTICHAIN_NATIVE_CURRENCY_TO_CAIP19 } from '../../../../shared/constants/multichain/assets';
1920

2021
export const isQuoteExpired = (
2122
isQuoteGoingToRefresh: boolean,
@@ -29,7 +30,10 @@ export const isQuoteExpired = (
2930
);
3031

3132
export const isNativeAddress = (address?: string | null) =>
32-
address === zeroAddress() || address === '' || !address;
33+
address === zeroAddress() ||
34+
address === '' ||
35+
!address ||
36+
MULTICHAIN_NATIVE_CURRENCY_TO_CAIP19.SOL.includes(address);
3337

3438
export const calcToAmount = (
3539
{ destTokenAmount, destAsset }: Quote,

0 commit comments

Comments
 (0)