Skip to content

Commit

Permalink
update sonic
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfantaholic committed Dec 14, 2024
1 parent 47c2c7c commit f30de23
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 25 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@real-wagmi/uikit",
"version": "1.4.2",
"version": "1.4.3",
"description": "",
"main": "dist/index.cjs",
"module": "dist/index.js",
Expand Down Expand Up @@ -61,8 +61,8 @@
"@ethersproject/address": "5.7.0",
"@popperjs/core": "^2.11.8",
"@reach/portal": "^0.18.0",
"@real-wagmi/sdk": "1.4.0",
"@real-wagmi/v3-sdk": "1.4.0",
"@real-wagmi/sdk": "1.4.2",
"@real-wagmi/v3-sdk": "1.4.1",
"@storybook/addon-themes": "^7.5.3",
"@tanstack/react-query": "^5.59.16",
"@types/styled-system": "^5.1.15",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Svg/Networks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export { default as MetisChain } from "./components/Metis";
export { default as BaseChain } from "./components/Base";
export { default as MetisTestnetChain } from "./components/MetisTestnet";
export { default as IotaChain } from "./components/Iota";
export { default as SonicTestnetChain } from "./components/SonicTestnet";
export { default as SonicChain } from "./components/Sonic";
2 changes: 1 addition & 1 deletion src/components/Svg/NetworksCircle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export { default as MetisCircleChain } from "./components/MetisCircle";
export { default as BaseCircleChain } from "./components/BaseCircle";
export { default as MetisTestnetCircleChain } from "./components/MetisTestnetCircle";
export { default as IotaCircleChain } from "./components/IotaCircle";
export { default as SonicTestnetCircleChain } from "./components/SonicTestnetCircle";
export { default as SonicCircleChain } from "./components/SonicCircle";
27 changes: 27 additions & 0 deletions src/components/Svg/NetworksGray/components/SonicGray.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { FC, ReactElement, PropsWithChildren, memo } from "react";
import Svg from "../../Svg";
import { SvgProps } from "../../types";
import { v4 as uuid } from "uuid";

const Item: FC<PropsWithChildren<SvgProps>> = (props): ReactElement => {
const id = uuid();
return (
<Svg viewBox="0 0 24 24" {...props} fill="none" stroke="none">
<g clipPath={`url(#${id})`}>
<path d="M14.0263 14.4336C10.2807 15.5584 7.18234 17.1992 5.24234 19.1216L5.15674 19.2072C5.67274 19.6952 6.23834 20.132 6.84954 20.5032L6.98074 20.3424C7.51034 19.6952 8.07834 19.0704 8.66954 18.4816C10.2567 16.9 12.0727 15.5312 14.0279 14.432L14.0255 14.4336H14.0263Z" fill="#AFB6C9"/>
<path d="M2.09521 12.7673C2.24481 14.7729 2.98961 16.6121 4.15842 18.1081L4.21202 18.0545C5.41281 16.8697 6.97601 15.7929 8.86161 14.8545C10.5144 14.0313 12.412 13.3249 14.4576 12.7673H2.09521Z" fill="#AFB6C9"/>
<path d="M9.7177 4.52398C13.0689 7.86318 17.2865 10.0712 21.9129 10.9088C21.3545 5.95838 17.1409 2.10718 12.0217 2.10718C10.6697 2.10718 9.3809 2.37678 8.2041 2.86318C8.6817 3.43838 9.1921 3.99838 9.7177 4.52398Z" fill="#AFB6C9"/>
<path d="M5.243 4.93286C7.183 6.85766 10.2814 8.49606 14.027 9.62326C12.0718 8.52246 10.2558 7.15526 8.6686 5.57366C8.079 4.98646 7.5118 4.36166 6.9798 3.71286L6.8486 3.55206C6.2374 3.92326 5.6718 4.35926 5.1582 4.84726L5.2438 4.93286H5.243Z" fill="#AFB6C9"/>
<path d="M9.7177 19.5304C9.1897 20.056 8.6801 20.616 8.2041 21.1912C9.3793 21.6776 10.6697 21.9472 12.0217 21.9472C17.1417 21.9472 21.3553 18.096 21.9145 13.144C17.2889 13.9816 13.0713 16.1896 9.7193 19.5288L9.7177 19.5304Z" fill="#AFB6C9"/>
<path d="M8.86161 9.20001C6.97601 8.26161 5.41281 7.18401 4.21202 6.00001L4.15842 5.94641C2.98961 7.44241 2.24481 9.28161 2.09521 11.2872H14.4552C12.4104 10.7296 10.5144 10.0232 8.85921 9.1976L8.86081 9.20001H8.86161Z" fill="#AFB6C9"/>
</g>
<defs>
<clipPath id={id}>
<rect width="20" height="20" fill="white" transform="translate(2 2)"/>
</clipPath>
</defs>
</Svg>
);
};

export default memo(Item);
3 changes: 2 additions & 1 deletion src/components/Svg/NetworksGray/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export { default as OptimismChainGray } from "./components/OptimismGray";
export { default as PolygonChainGray } from "./components/PolygonGray";
export { default as BaseChainGray } from "./components/BaseGray";
export { default as ZkSyncEraChainGray } from "./components/ZkSyncEraGray";
export { default as IotaChainGray } from "./components/IotaGray";
export { default as IotaChainGray } from "./components/IotaGray";
export { default as SonicChainGray } from "./components/SonicGray";
5 changes: 3 additions & 2 deletions src/components/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test('exports', () => {
"BaseChain",
"MetisTestnetChain",
"IotaChain",
"SonicTestnetChain",
"SonicChain",
"ArbitrumCircleChain",
"AvalancheCircleChain",
"BscCircleChain",
Expand All @@ -87,7 +87,7 @@ test('exports', () => {
"BaseCircleChain",
"MetisTestnetCircleChain",
"IotaCircleChain",
"SonicTestnetCircleChain",
"SonicCircleChain",
"ArbitrumChainGray",
"AvalancheChainGray",
"BscChainGray",
Expand All @@ -100,6 +100,7 @@ test('exports', () => {
"BaseChainGray",
"ZkSyncEraChainGray",
"IotaChainGray",
"SonicChainGray",
"MetaMask",
"BinanceWallet",
"CoinbaseWallet",
Expand Down
5 changes: 3 additions & 2 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test('exports', () => {
"BaseChain",
"MetisTestnetChain",
"IotaChain",
"SonicTestnetChain",
"SonicChain",
"ArbitrumCircleChain",
"AvalancheCircleChain",
"BscCircleChain",
Expand All @@ -87,7 +87,7 @@ test('exports', () => {
"BaseCircleChain",
"MetisTestnetCircleChain",
"IotaCircleChain",
"SonicTestnetCircleChain",
"SonicCircleChain",
"ArbitrumChainGray",
"AvalancheChainGray",
"BscChainGray",
Expand All @@ -100,6 +100,7 @@ test('exports', () => {
"BaseChainGray",
"ZkSyncEraChainGray",
"IotaChainGray",
"SonicChainGray",
"MetaMask",
"BinanceWallet",
"CoinbaseWallet",
Expand Down
6 changes: 3 additions & 3 deletions src/utils/getChainLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
BaseChain,
MetisTestnetChain,
IotaChain,
SonicTestnetChain
SonicChain
} from "../components/Svg/Networks";

import {
Expand All @@ -30,7 +30,7 @@ import {
BaseCircleChain,
MetisTestnetCircleChain,
IotaCircleChain,
SonicTestnetCircleChain
SonicCircleChain
} from "../components/Svg/NetworksCircle";

export default function getChainLogo(chainId = ChainId.ETHEREUM, circle = false){
Expand All @@ -46,6 +46,6 @@ export default function getChainLogo(chainId = ChainId.ETHEREUM, circle = false)
if(chainId === ChainId.METIS_SEPOLIA) return circle ? MetisTestnetCircleChain : MetisTestnetChain;
if(chainId === ChainId.BASE) return circle ? BaseCircleChain : BaseChain;
if(chainId === ChainId.IOTA) return circle ? IotaCircleChain : IotaChain;
if(chainId === ChainId.SONIC_TESTNET) return circle ? SonicTestnetCircleChain : SonicTestnetChain;
if(chainId === ChainId.SONIC) return circle ? SonicCircleChain : SonicChain;
return circle ? EthereumCircleChain : EthereumChain;
}
4 changes: 3 additions & 1 deletion src/utils/getGrayChainLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
OptimismChainGray,
PolygonChainGray,
ZkSyncEraChainGray,
IotaChainGray
IotaChainGray,
SonicChainGray
} from "../components/Svg/NetworksGray";

export default function getGrayChainLogo(chainId = ChainId.ETHEREUM) {
Expand All @@ -27,5 +28,6 @@ export default function getGrayChainLogo(chainId = ChainId.ETHEREUM) {
if (chainId === ChainId.POLYGON) return PolygonChainGray;
if (chainId === ChainId.ZKSYNC) return ZkSyncEraChainGray;
if (chainId === ChainId.IOTA) return IotaChainGray;
if (chainId === ChainId.SONIC) return SonicChainGray;
return EthereumChainGray;
}
4 changes: 2 additions & 2 deletions src/utils/getNativeCurrencyLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
AvalancheCircleChain,
MetisCircleChain,
IotaCircleChain,
SonicTestnetCircleChain
SonicCircleChain
} from "../components/Svg/NetworksCircle";

export default function getNativeCurrencyLogo(chainId = ChainId.ETHEREUM){
Expand All @@ -20,6 +20,6 @@ export default function getNativeCurrencyLogo(chainId = ChainId.ETHEREUM){
if(chainId === ChainId.AVALANCHE) return AvalancheCircleChain;
if(chainId === ChainId.METIS || chainId === ChainId.METIS_SEPOLIA) return MetisCircleChain;
if(chainId === ChainId.IOTA) return IotaCircleChain;
if(chainId === ChainId.SONIC_TESTNET) return SonicTestnetCircleChain;
if(chainId === ChainId.SONIC) return SonicCircleChain;
return EthereumCircleChain;
}
31 changes: 22 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2173,10 +2173,10 @@
resolved "https://registry.yarnpkg.com/@reach/utils/-/utils-0.18.0.tgz#4f3cebe093dd436eeaff633809bf0f68f4f9d2ee"
integrity sha512-KdVMdpTgDyK8FzdKO9SCpiibuy/kbv3pwgfXshTI6tEcQT1OOwj7BAksnzGC0rPz0UholwC+AgkqEl3EJX3M1A==

"@real-wagmi/[email protected].0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@real-wagmi/sdk/-/sdk-1.4.0.tgz#c1af6b3d5048aabc25f24e0cc4d69d2f6be904e2"
integrity sha512-i2GZbqzvz5SK8MII2uqnwfFgYejIKfjGRctxDecIyO1N9JADjhf7oP/MSvUVcdXFcBeneKkurTFkZvy4mp4IPw==
"@real-wagmi/[email protected].1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@real-wagmi/sdk/-/sdk-1.4.1.tgz#60d07adbdb56bd01599ca5ce9caf3867ca95b12b"
integrity sha512-RxGxnZCazmVgUmdthIfKSXmaGME3p5xNqOPALMjGe/MFdw3lE3irrV2kOv+JwYIWLAtzwpx84yBdG7i6l3Wc0A==
dependencies:
"@uniswap/token-lists" "1.0.0-beta.33"
big.js "^6.2.1"
Expand All @@ -2186,12 +2186,25 @@
viem "^2.7.20"
vitest "^1.3.1"

"@real-wagmi/[email protected]":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@real-wagmi/v3-sdk/-/v3-sdk-1.4.0.tgz#e01b1dd0e446fe6916099a9dcf0e3cdc765ab839"
integrity sha512-dlOKK93JY0Hs1pDCtih4kdsG7FRbh0O75DsTsz4ca2YfsKSv+8/oNl9U/3p7kqIicjNf/BSpcngOIqg0g905sQ==
"@real-wagmi/[email protected]":
version "1.4.2"
resolved "https://registry.yarnpkg.com/@real-wagmi/sdk/-/sdk-1.4.2.tgz#a23872f3b3fba301450be50a0f35fd34f98f9780"
integrity sha512-SQ5qc6SNDkbSIWQRfB5X8eRnQC1NAKjGFJSyPGesWKNlh+G5cDsIK0sWHaT4KL7TiziMaCRwJ7ubh+SD7XuhpA==
dependencies:
"@uniswap/token-lists" "1.0.0-beta.33"
big.js "^6.2.1"
decimal.js-light "^2.5.1"
tiny-invariant "^1.3.1"
toformat "^2.0.0"
viem "^2.7.20"
vitest "^1.3.1"

"@real-wagmi/[email protected]":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@real-wagmi/v3-sdk/-/v3-sdk-1.4.1.tgz#88b280fbf333fa1d80f8f3a2a10aeacd2477e90a"
integrity sha512-8j8ThOEnYUT4BFEZweIWIRv36Rm74m9hzPxR+HlnhbyKwjoutB6qxGIvSzG8/f0/ePyI3GNosT25+9n4vEjWLw==
dependencies:
"@real-wagmi/sdk" "1.4.0"
"@real-wagmi/sdk" "1.4.1"
viem "^2.7.22"

"@rollup/pluginutils@^4.2.0":
Expand Down

0 comments on commit f30de23

Please sign in to comment.