Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
247 changes: 176 additions & 71 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@1shotapi/ows-signer-utils": "^0.6.2",
"@1shotapi/ows-types": "^0.8.0",
"@1shotapi/ows-wallet-utils": "^0.5.1",
"@crcl-main/app-kit": "^1.10.0-canary-feature-onramp-kit-sdk.1784835391",
"@crcl-main/app-kit": "^1.14.0-canary-feature-onramp-kit-sdk.1789055534",
"@fontsource-variable/geist": "^5.3.0",
"@metamask/smart-accounts-kit": "^2.0.0",
"@reown/walletkit": "^1.5.6",
Expand Down
8 changes: 7 additions & 1 deletion src/components/AssetDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export function AssetDetails({ asset: assetProp }: IAssetDetailsProps) {
decimals,
assetProp.id,
balance,
assetProp.iconUrl,
assetProp.weight,
);

useEffect(() => {
Expand Down Expand Up @@ -162,6 +164,7 @@ export function AssetDetails({ asset: assetProp }: IAssetDetailsProps) {
chainId={asset.chainId}
address={asset.address}
symbol={asset.symbol}
iconUrl={asset.iconUrl}
chainLogoUrl={chain?.logoUrl}
/>
<div className="flex flex-col gap-0.5">
Expand All @@ -175,7 +178,10 @@ export function AssetDetails({ asset: assetProp }: IAssetDetailsProps) {
balance={asset.balance}
decimals={asset.decimals}
fallback={
asset.type !== EAssetType.Erc20 ? copy.balanceNonErc20 : undefined
asset.type !== EAssetType.Erc20 &&
asset.type !== EAssetType.Native
? copy.balanceNonErc20
: undefined
}
className="text-primary text-3xl font-semibold tracking-tight"
/>
Expand Down
4 changes: 3 additions & 1 deletion src/components/balances/AssetList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export function AssetList({
chainId={row.original.chainId}
address={row.original.address}
symbol={row.original.symbol}
iconUrl={row.original.iconUrl}
/>
<span className="truncate font-medium">{row.original.symbol}</span>
</div>
Expand All @@ -112,7 +113,8 @@ export function AssetList({
balance={row.original.balance}
decimals={row.original.decimals}
fallback={
row.original.type !== EAssetType.Erc20
row.original.type !== EAssetType.Erc20 &&
row.original.type !== EAssetType.Native
? copy.balanceNonErc20
: undefined
}
Expand Down
66 changes: 65 additions & 1 deletion src/lib/implementations/data/HardcodedChainRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import {
} from "@1shotapi/ows-types";
import { EnableArcMainnet } from "../../features";
import type { IChainRepository } from "../../interfaces/data/IChainRepository";
import { SupportedChain } from "../../types/domain/SupportedChain";
import {
type INativeCurrency,
SupportedChain,
} from "../../types/domain/SupportedChain";
import { EChain } from "../../types/enum/EChain";
import { EChainNetworkType } from "../../types/enum/EChainNetworkType";
import { ChainDisplayUtils } from "../utils/ChainDisplayUtils";
Expand Down Expand Up @@ -37,6 +40,49 @@ const ALCHEMY_KEY = "jqLUTbHeN_cVsIX2W7tJk";
* endpoints from config — this catalog value is informational only.
*/
const BITCOIN_RPC_URL = "https://rpc.ankr.com/btc";

const NATIVE_ETH: INativeCurrency = {
name: "Ether",
symbol: "ETH",
decimals: 18,
};
const NATIVE_BTC: INativeCurrency = {
name: "Bitcoin",
symbol: "BTC",
decimals: 8,
};
/** Arc uses USDC as gas — no separate Native tracked row (see known assets). */
const NATIVE_ARC_USDC: INativeCurrency = {
name: "USDC",
symbol: "USDC",
decimals: 6,
};
const NATIVE_BNB: INativeCurrency = {
name: "BNB",
symbol: "BNB",
decimals: 18,
};
const NATIVE_POL: INativeCurrency = {
name: "POL",
symbol: "POL",
decimals: 18,
};
const NATIVE_S: INativeCurrency = {
name: "Sonic",
symbol: "S",
decimals: 18,
};
const NATIVE_MON: INativeCurrency = {
name: "Monad",
symbol: "MON",
decimals: 18,
};
const NATIVE_CELO: INativeCurrency = {
name: "CELO",
symbol: "CELO",
decimals: 18,
};

/**
* Public Relayer docs networks + Arc Testnet (dev relayer) + Robinhood.
* `weight` controls order within Mainnet/Testnet groups (higher = first).
Expand All @@ -54,6 +100,7 @@ const CATALOG: readonly SupportedChain[] = [
"Arc",
"https://explorer.arc.io",
false,
NATIVE_ARC_USDC,
100,
),
new SupportedChain(
Expand All @@ -67,6 +114,7 @@ const CATALOG: readonly SupportedChain[] = [
"Arc Testnet",
"https://testnet.arcscan.app",
true,
NATIVE_ARC_USDC,
100,
),
new SupportedChain(
Expand All @@ -80,6 +128,7 @@ const CATALOG: readonly SupportedChain[] = [
"Sepolia",
"https://sepolia.etherscan.io",
true,
NATIVE_ETH,
80,
),
new SupportedChain(
Expand All @@ -93,6 +142,7 @@ const CATALOG: readonly SupportedChain[] = [
"Base Sepolia",
"https://sepolia.basescan.org",
true,
NATIVE_ETH,
90,
),
new SupportedChain(
Expand All @@ -106,6 +156,7 @@ const CATALOG: readonly SupportedChain[] = [
"Bitcoin Testnet",
"https://mempool.space/testnet",
false,
NATIVE_BTC,
75,
),
new SupportedChain(
Expand All @@ -119,6 +170,7 @@ const CATALOG: readonly SupportedChain[] = [
"Bitcoin",
"https://mempool.space",
false,
NATIVE_BTC,
85,
),
new SupportedChain(
Expand All @@ -132,6 +184,7 @@ const CATALOG: readonly SupportedChain[] = [
"Ethereum",
"https://etherscan.io",
true,
NATIVE_ETH,
80,
),
new SupportedChain(
Expand All @@ -145,6 +198,7 @@ const CATALOG: readonly SupportedChain[] = [
"Linea",
"https://lineascan.build",
true,
NATIVE_ETH,
),
new SupportedChain(
EChain.Arbitrum,
Expand All @@ -157,6 +211,7 @@ const CATALOG: readonly SupportedChain[] = [
"Arbitrum",
"https://arbiscan.io",
true,
NATIVE_ETH,
),
new SupportedChain(
EChain.Optimism,
Expand All @@ -169,6 +224,7 @@ const CATALOG: readonly SupportedChain[] = [
"Optimism",
"https://optimistic.etherscan.io",
true,
NATIVE_ETH,
),
new SupportedChain(
EChain.Bsc,
Expand All @@ -181,6 +237,7 @@ const CATALOG: readonly SupportedChain[] = [
"BSC",
"https://bscscan.com",
false,
NATIVE_BNB,
),
new SupportedChain(
EChain.Base,
Expand All @@ -193,6 +250,7 @@ const CATALOG: readonly SupportedChain[] = [
"Base",
"https://basescan.org",
true,
NATIVE_ETH,
90,
),
new SupportedChain(
Expand All @@ -206,6 +264,7 @@ const CATALOG: readonly SupportedChain[] = [
"Polygon",
"https://polygonscan.com",
true,
NATIVE_POL,
),
new SupportedChain(
EChain.Sonic,
Expand All @@ -218,6 +277,7 @@ const CATALOG: readonly SupportedChain[] = [
"Sonic",
"https://sonicscan.org",
true,
NATIVE_S,
),
new SupportedChain(
EChain.Unichain,
Expand All @@ -230,6 +290,7 @@ const CATALOG: readonly SupportedChain[] = [
"Unichain",
"https://uniscan.xyz",
true,
NATIVE_ETH,
),
new SupportedChain(
EChain.Monad,
Expand All @@ -242,6 +303,7 @@ const CATALOG: readonly SupportedChain[] = [
"Monad",
"https://monadvision.com",
true,
NATIVE_MON,
),
new SupportedChain(
EChain.Celo,
Expand All @@ -254,6 +316,7 @@ const CATALOG: readonly SupportedChain[] = [
"Celo",
"https://celoscan.io",
false,
NATIVE_CELO,
),
new SupportedChain(
EChain.Robinhood,
Expand All @@ -266,6 +329,7 @@ const CATALOG: readonly SupportedChain[] = [
"Robinhood",
"https://robinhoodchain.blockscout.com",
false,
NATIVE_ETH,
),
];

Expand Down
Loading