Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add OKX wallet info #489

Merged
merged 7 commits into from
Jan 15, 2024
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
7 changes: 7 additions & 0 deletions .changeset/moody-planes-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@ant-design/web3-assets': minor
'@ant-design/web3-icons': minor
'@ant-design/web3-wagmi': minor
---

feat: Add OKX wallet info
1 change: 1 addition & 0 deletions .dumi/theme/builtins/IconSearch/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const tool = [
'PancakeSwap',
'SushiSwap',
'Phantom',
'OkxWallet',
];

const datum = [...chain, ...token, ...tool];
Expand Down
1 change: 1 addition & 0 deletions packages/assets/src/wallets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './wallet-connect';
export * from './coinbase-wallet';
export * from './token-pocket';
export * from './safeheron';
export * from './okx-wallet';
20 changes: 20 additions & 0 deletions packages/assets/src/wallets/okx-wallet.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { WalletMetadata } from '@ant-design/web3-common';
import { ChromeCircleColorful, OkxWalletColorful } from '@ant-design/web3-icons';

export const metadata_OkxWallet: WalletMetadata = {
icon: <OkxWalletColorful />,
name: 'OkxWallet',
remark: 'Okx Wallet',
app: {
link: 'https://www.okx.com/download',
},
extensions: [
{
key: 'Chrome',
browserIcon: <ChromeCircleColorful />,
browserName: 'Chrome',
link: 'https://chromewebstore.google.com/detail/mcohilncbfahbmgdjkbpemcciiolgcge',
description: 'Access your wallet right from your favorite web browser.',
},
],
};
101 changes: 80 additions & 21 deletions packages/icons/src/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,65 @@ exports[`Test Icons > should render all icons 30`] = `
`;

exports[`Test Icons > should render all icons 31`] = `
<span
class="anticon ant-web3-icon-okx-colorful"
role="img"
>
<svg
aria-hidden="true"
class=""
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 2500 2500"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<style
type="text/css"
>

.ant-web3-icon-tokenpocket-colorful-s0{fill-rule:evenodd;clip-rule:evenodd;}
.ant-web3-icon-tokenpocket-colorful-st1{fill:#FFFFFF;}

</style>
<g>
<g>
<rect
class="ant-web3-icon-tokenpocket-colorful-s0"
height="2500"
width="2500"
y="0"
/>
<g>
<path
class="ant-web3-icon-tokenpocket-colorful-st1"
d="M1463,1015h-404c-17,0-31,14-31,31v404c0,17,14,31,31,31h404c17,0,31-14,31-31v-404 C1494,1029,1480,1015,1463,1015z"
/>
<path
class="ant-web3-icon-tokenpocket-colorful-st1"
d="M996,549H592c-17,0-31,14-31,31v404c0,17,14,31,31,31h404c17,0,31-14,31-31V580C1027,563,1013,549,996,549z"
/>
<path
class="ant-web3-icon-tokenpocket-colorful-st1"
d="M1930,549h-404c-17,0-31,14-31,31v404c0,17,14,31,31,31h404c17,0,31-14,31-31V580 C1961,563,1947,549,1930,549z"
/>
<path
class="ant-web3-icon-tokenpocket-colorful-st1"
d="M996,1482H592c-17,0-31,14-31,31v404c0,17,14,31,31,31h404c17,0,31-14,31-31v-404 C1027,1496,1013,1482,996,1482z"
/>
<path
class="ant-web3-icon-tokenpocket-colorful-st1"
d="M1930,1482h-404c-17,0-31,14-31,31v404c0,17,14,31,31,31h404c17,0,31-14,31-31v-404 C1961,1496,1947,1482,1930,1482z"
/>
</g>
</g>
</g>
</svg>
</span>
`;

exports[`Test Icons > should render all icons 32`] = `
<span
class="anticon ant-web3-icon-moonbeam-colorful"
role="img"
Expand Down Expand Up @@ -1419,7 +1478,7 @@ exports[`Test Icons > should render all icons 31`] = `
</span>
`;

exports[`Test Icons > should render all icons 32`] = `
exports[`Test Icons > should render all icons 33`] = `
<span
class="anticon ant-web3-icon-metamask-colorful"
role="img"
Expand Down Expand Up @@ -1498,7 +1557,7 @@ exports[`Test Icons > should render all icons 32`] = `
</span>
`;

exports[`Test Icons > should render all icons 33`] = `
exports[`Test Icons > should render all icons 34`] = `
<span
class="anticon ant-web3-icon-fantom-circle-colorful"
role="img"
Expand Down Expand Up @@ -1565,7 +1624,7 @@ exports[`Test Icons > should render all icons 33`] = `
</span>
`;

exports[`Test Icons > should render all icons 34`] = `
exports[`Test Icons > should render all icons 35`] = `
<span
class="anticon ant-web3-icon-etherscan-circle-colorful"
role="img"
Expand All @@ -1592,7 +1651,7 @@ exports[`Test Icons > should render all icons 34`] = `
</span>
`;

exports[`Test Icons > should render all icons 35`] = `
exports[`Test Icons > should render all icons 36`] = `
<span
class="anticon ant-web3-icon-ethereum-filled"
role="img"
Expand All @@ -1617,7 +1676,7 @@ exports[`Test Icons > should render all icons 35`] = `
</span>
`;

exports[`Test Icons > should render all icons 36`] = `
exports[`Test Icons > should render all icons 37`] = `
<span
class="anticon ant-web3-icon-ethereum-colorful"
role="img"
Expand Down Expand Up @@ -1660,7 +1719,7 @@ exports[`Test Icons > should render all icons 36`] = `
</span>
`;

exports[`Test Icons > should render all icons 37`] = `
exports[`Test Icons > should render all icons 38`] = `
<span
class="anticon ant-web3-icon-ethereum-circle-filled"
role="img"
Expand Down Expand Up @@ -1713,7 +1772,7 @@ exports[`Test Icons > should render all icons 37`] = `
</span>
`;

exports[`Test Icons > should render all icons 38`] = `
exports[`Test Icons > should render all icons 39`] = `
<span
class="anticon ant-web3-icon-ethereum-circle-colorful"
role="img"
Expand Down Expand Up @@ -1802,7 +1861,7 @@ exports[`Test Icons > should render all icons 38`] = `
</span>
`;

exports[`Test Icons > should render all icons 39`] = `
exports[`Test Icons > should render all icons 40`] = `
<span
class="anticon ant-web3-icon-dai-circle-colorful"
role="img"
Expand Down Expand Up @@ -1838,7 +1897,7 @@ exports[`Test Icons > should render all icons 39`] = `
</span>
`;

exports[`Test Icons > should render all icons 40`] = `
exports[`Test Icons > should render all icons 41`] = `
<span
class="anticon ant-web3-icon-cronos-colorful"
role="img"
Expand Down Expand Up @@ -1918,7 +1977,7 @@ exports[`Test Icons > should render all icons 40`] = `
</span>
`;

exports[`Test Icons > should render all icons 41`] = `
exports[`Test Icons > should render all icons 42`] = `
<span
class="anticon ant-web3-icon-coinbase-wallet-circle-colorful"
role="img"
Expand Down Expand Up @@ -1964,7 +2023,7 @@ exports[`Test Icons > should render all icons 41`] = `
</span>
`;

exports[`Test Icons > should render all icons 42`] = `
exports[`Test Icons > should render all icons 43`] = `
<span
class="anticon ant-web3-icon-chrome-circle-colorful"
role="img"
Expand Down Expand Up @@ -2070,7 +2129,7 @@ exports[`Test Icons > should render all icons 42`] = `
</span>
`;

exports[`Test Icons > should render all icons 43`] = `
exports[`Test Icons > should render all icons 44`] = `
<span
class="anticon ant-web3-icon-celo-colorful"
role="img"
Expand Down Expand Up @@ -2113,7 +2172,7 @@ exports[`Test Icons > should render all icons 43`] = `
</span>
`;

exports[`Test Icons > should render all icons 44`] = `
exports[`Test Icons > should render all icons 45`] = `
<span
class="anticon ant-web3-icon-bsc-circle-colorful"
role="img"
Expand Down Expand Up @@ -2152,7 +2211,7 @@ exports[`Test Icons > should render all icons 44`] = `
</span>
`;

exports[`Test Icons > should render all icons 45`] = `
exports[`Test Icons > should render all icons 46`] = `
<span
class="anticon ant-web3-icon-bitcoin-filled"
role="img"
Expand All @@ -2174,7 +2233,7 @@ exports[`Test Icons > should render all icons 45`] = `
</span>
`;

exports[`Test Icons > should render all icons 46`] = `
exports[`Test Icons > should render all icons 47`] = `
<span
class="anticon ant-web3-icon-bitcoin-circle-filled"
role="img"
Expand Down Expand Up @@ -2221,7 +2280,7 @@ exports[`Test Icons > should render all icons 46`] = `
</span>
`;

exports[`Test Icons > should render all icons 47`] = `
exports[`Test Icons > should render all icons 48`] = `
<span
class="anticon ant-web3-icon-bitcoin-circle-colorful"
role="img"
Expand All @@ -2248,7 +2307,7 @@ exports[`Test Icons > should render all icons 47`] = `
</span>
`;

exports[`Test Icons > should render all icons 48`] = `
exports[`Test Icons > should render all icons 49`] = `
<span
class="anticon ant-web3-icon-base-circle-colorful"
role="img"
Expand Down Expand Up @@ -2283,7 +2342,7 @@ exports[`Test Icons > should render all icons 48`] = `
</span>
`;

exports[`Test Icons > should render all icons 49`] = `
exports[`Test Icons > should render all icons 50`] = `
<span
class="anticon ant-web3-icon-avalanche-circle-colorful"
role="img"
Expand Down Expand Up @@ -2326,7 +2385,7 @@ exports[`Test Icons > should render all icons 49`] = `
</span>
`;

exports[`Test Icons > should render all icons 50`] = `
exports[`Test Icons > should render all icons 51`] = `
<span
class="anticon ant-web3-icon-arbitrum-colorful"
role="img"
Expand Down Expand Up @@ -2365,7 +2424,7 @@ exports[`Test Icons > should render all icons 50`] = `
</span>
`;

exports[`Test Icons > should render all icons 51`] = `
exports[`Test Icons > should render all icons 52`] = `
<span
class="anticon ant-web3-icon-arbitrum-circle-colorful"
role="img"
Expand Down Expand Up @@ -2449,7 +2508,7 @@ exports[`Test Icons > should render all icons 51`] = `
</span>
`;

exports[`Test Icons > should render all icons 52`] = `
exports[`Test Icons > should render all icons 53`] = `
<span
class="anticon ant-web3-icon-aave-circle-colorful"
role="img"
Expand Down
21 changes: 21 additions & 0 deletions packages/icons/src/components/okx-colorful.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react';
import AntdIcon from '@ant-design/icons';
import { type IconBaseProps } from '@ant-design/icons/lib/components/Icon';
import { ConfigProvider } from 'antd';
import classnames from 'classnames';

import SVGComponent from '../svgs/okx-colorful.svg';

export const OkxWalletColorful = React.forwardRef<HTMLSpanElement, IconBaseProps>((props, ref) => {
const { getPrefixCls } = React.useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('web3-icon-okx-colorful');
return (
<AntdIcon
{...props}
className={classnames(prefixCls, props.className)}
ref={ref}
component={SVGComponent}
/>
);
});
OkxWalletColorful.displayName = 'OkxWalletColorful';
1 change: 1 addition & 0 deletions packages/icons/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export * from './components/fantom-circle-colorful';
export * from './components/chrome-circle-colorful';

export * from './components/tokenpocket-colorful';
export * from './components/okx-colorful';

export * from './components/cronos-colorful';
export * from './components/wbtc-circle-colorful';
Expand Down
19 changes: 19 additions & 0 deletions packages/icons/src/svgs/okx-colorful.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading