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
8 changes: 1 addition & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
"workspaces": [
"packages/*"
],
"resolutions": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0"
},
"license": "GPL-3.0-or-later",
"devDependencies": {
"@commitlint/cli": "^20.1.0",
Expand All @@ -43,4 +37,4 @@
"semantic-release": "24.2.0",
"semantic-release-monorepo": "^8.0.2"
}
}
}
4 changes: 2 additions & 2 deletions packages/doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@babel/runtime": "^7.17.0",
"@dodoex/components": "^3.0.2",
"@dodoex/components": "^3.3.0",
"@emotion/styled": "^11.10.0",
"@storybook/addon-docs": "^9.1.10",
"@web3modal/ethers5": "^3.5.5",
Expand Down Expand Up @@ -43,4 +43,4 @@
"eslint-plugin-storybook": "9.1.10",
"@storybook/addon-docs": "^9.1.10"
}
}
}
2 changes: 1 addition & 1 deletion packages/doc/src/stories/widgets/Pool.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Primary.args = {
supportAMMV3: true,
supportChainIds: [
1, 42161, 137, 56, 10, 43114, 1313161554, 1030, 8453, 59144, 534352, 169,
5000, 200901, 48900, 196, 543210, 177, 43111, 988, 421614, 53457,
5000, 200901, 48900, 196, 543210, 177, 43111, 988, 421614, 53457, 173
],
// onlyChainId: 688689,
showSubmissionSubmittedDialog: true,
Expand Down
6 changes: 3 additions & 3 deletions packages/dodoex-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/api",
"version": "3.5.0",
"version": "3.7.0",
"description": "DODO API Kit",
"source": "src/index.ts",
"types": "dist/types/index.d.ts",
Expand All @@ -21,7 +21,7 @@
"release": "semantic-release",
"release:local": "np --any-branch --no-cleanup --no-tests",
"release.npm-publish": "npm publish --access public",
"release.npm-publish-beta": "npm publish --tag beta"
"release.npm-publish-beta": "yarn run prerelease && npm publish --tag beta"
},
"author": "",
"publishConfig": {
Expand Down Expand Up @@ -103,4 +103,4 @@
"ts-jest": "^29.0.1",
"typescript": "^5.6.3"
}
}
}
8 changes: 8 additions & 0 deletions packages/dodoex-api/src/chainConfig/basicToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,12 @@ export const basicTokenMap: {
wrappedTokenSymbol: 'USDT0',
wrappedTokenAddress: '0x779Ded0c9e1022225f8E0630b35a9b54bE713736',
},
[ChainId.ENI]: {
...DEFAULT_BASIC_TOKEN,
symbol: 'EGAS',
name: 'EGAS',
showDecimals: 6,
wrappedTokenSymbol: 'WEGAS',
wrappedTokenAddress: '0x6D1e851446F4D004AE2A72F9AfEd85e8829A205E',
},
};
2 changes: 2 additions & 0 deletions packages/dodoex-api/src/chainConfig/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ export enum ChainId {

STABLE_TESTNET = 2201,
STABLE = 988,

ENI = 173,
}
15 changes: 15 additions & 0 deletions packages/dodoex-api/src/chainConfig/contractConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
pharosAtlanticTestnet,
stableTestnet,
stable,
eni
} from '@dodoex/dodo-contract-request';
import { ChainId } from './chain';

Expand Down Expand Up @@ -543,6 +544,20 @@ const contractMap: {
DODO_DPP_PROXY: stable.DODODppProxy,
DODO_MINEV3_PROXY: stable.DODOMineV3Proxy,
},
[ChainId.ENI]: {
MULTI_CALL: eni.MulticallWithValid,
DODO_APPROVE: eni.DODOApprove,
ERC20_HELPER: eni.ERC20Helper,

ROUTE_V2_DATA_FETCH: eni.DODOV2RouteHelper,
ROUTE_V1_DATA_FETCH: eni.DODOV1PmmHelper,
CALLEE_HELPER: eni.DODOCalleeHelper,

DODO_PROXY: eni.DODOV2Proxy02,
DODO_DSP_PROXY: eni.DODODspProxy,
DODO_DPP_PROXY: eni.DODODppProxy,
DODO_MINEV3_PROXY: eni.DODOMineV3Proxy,
},
};

export default contractMap;
1 change: 1 addition & 0 deletions packages/dodoex-api/src/chainConfig/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ export const platformIdMap: {
[ChainId.PHAROS_ATLANTIC_TESTNET]: 'pharos-atlantic-testnet',
[ChainId.STABLE_TESTNET]: 'stable-testnet',
[ChainId.STABLE]: 'stable',
[ChainId.ENI]: 'eni',
};
2 changes: 2 additions & 0 deletions packages/dodoex-api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"extends": "../../tsconfig",
"compilerOptions": {
"declarationDir": "./dist/types",
"outDir": "./dist",
"types": ["node", "jest", "qs"],
"jsx": "preserve",
"target": "es2016"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/dodoex-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/components",
"version": "3.2.0",
"version": "3.3.0",
"description": "UI component library",
"source": "src/index.ts",
"types": "dist/types/index.d.ts",
Expand All @@ -14,7 +14,7 @@
"prerelease": "yarn run build",
"release": "semantic-release",
"release:local": "np --any-branch --no-cleanup --no-tests",
"release.npm-publish-beta": "npm publish --tag beta"
"release.npm-publish-beta": "yarn run prerelease && npm publish --tag beta"
},
"author": "",
"publishConfig": {
Expand Down
8 changes: 6 additions & 2 deletions packages/dodoex-components/src/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const Listbox = styled('ul')(
`,
);

// @ts-ignore
const AnimatedListbox = React.forwardRef(function AnimatedListbox<
Value extends {},
Multiple extends boolean,
Expand Down Expand Up @@ -97,6 +98,7 @@ const AnimatedListbox = React.forwardRef(function AnimatedListbox<
);
});

// @ts-ignore
const Button = React.forwardRef(function Button<
TValue extends {},
Multiple extends boolean,
Expand Down Expand Up @@ -187,8 +189,10 @@ const Popup = styled('div')`
z-index: 10;
`;

interface Props<T extends {} = SelectOption, Multiple extends boolean = false>
extends SelectProps<T, Multiple> {
interface Props<
T extends {} = SelectOption,
Multiple extends boolean = false,
> extends SelectProps<T, Multiple> {
options?: SelectOption[];
fullWidth?: boolean;
px?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const TabsList = React.forwardRef<
variant?: TabProps['variant'];
}
>(function TabsList({ sx, variant, ...props }, ref) {
const tabListRef = React.useRef<HTMLDivElement>();
const tabListRef = React.useRef<HTMLDivElement>(null);
React.useEffect(() => {
if (
tabListRef.current &&
Expand Down
2 changes: 1 addition & 1 deletion packages/dodoex-components/src/Tabs/TabsGroup/TabsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const TabsList = React.forwardRef<
sx?: BoxProps['sx'];
}
>(function TabsList({ sx, ...props }, ref) {
const tabListRef = React.useRef<HTMLDivElement>();
const tabListRef = React.useRef<HTMLDivElement>(null);
const theme = useTheme();
React.useEffect(() => {
if (
Expand Down
6 changes: 3 additions & 3 deletions packages/dodoex-components/src/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface TooltipProps {
title: React.ReactNode | string;
maxWidth?: string | number;
sx?: BoxProps['sx'];
children: ReactElement<any, string | JSXElementConstructor<any>>;
children: React.ReactElement<any, string | JSXElementConstructor<any>>;
container?: PopperUnstyledProps['container'];
direction?: PopperUnstyledProps['direction'];
disablePortal?: PopperUnstyledProps['disablePortal'];
Expand Down Expand Up @@ -107,8 +107,8 @@ export default function Tooltip({
const { isMobile } = useDevices();
const enterTooltip = useRef(false);
const enterTrigger = useRef(false);
const enterTimer = useRef<NodeJS.Timeout>();
const leaveTimer = useRef<NodeJS.Timeout>();
const enterTimer = useRef<NodeJS.Timeout | undefined>(undefined);
const leaveTimer = useRef<NodeJS.Timeout | undefined>(undefined);

const [childrenRef, setChildrenRef] = useState<HTMLDivElement>();
const [arrowRef, setArrowRef] = useState<HTMLDivElement>();
Expand Down
2 changes: 1 addition & 1 deletion packages/dodoex-components/src/Tooltip/TooltipToast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface TooltipToastProps {
arrow?: TooltipProps['arrow'];
placement?: TooltipProps['placement'];
leaveDelay?: TooltipProps['leaveDelay'];
children: JSX.Element;
children: React.ReactElement;
tooltipSx?: BoxProps['sx'];
open?: boolean;
onOpen?: () => void;
Expand Down
4 changes: 3 additions & 1 deletion packages/dodoex-components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"declarationDir": "./dist/types"
"declarationDir": "./dist/types",
"outDir": "./dist",
"types": ["react", "react-dom", "node", "lodash"]
},
"exclude": ["node_modules", "**/*.d.mts"],
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx"]
Expand Down
14 changes: 7 additions & 7 deletions packages/dodoex-widgets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/widgets",
"version": "3.14.0",
"version": "3.18.0",
"description": "DODO Widgets",
"source": "src/index.tsx",
"types": "dist/types/index.d.ts",
Expand All @@ -23,7 +23,7 @@
"release": "semantic-release",
"release:local": "np --any-branch --no-cleanup --no-tests",
"release.npm-publish": "npm publish --access public",
"release.npm-publish-beta": "npm publish --tag beta",
"release.npm-publish-beta": "yarn run prerelease && npm publish --tag beta",
"test": "jest src",
"test:e2e": "jest e2e"
},
Expand Down Expand Up @@ -58,10 +58,10 @@
},
"dependencies": {
"@babel/runtime": "^7.17.0",
"@dodoex/api": "3.5.0",
"@dodoex/components": "^3.2.0",
"@dodoex/api": "^3.7.0",
"@dodoex/components": "^3.3.0",
"@dodoex/contract-request": "^1.3.0",
"@dodoex/dodo-contract-request": "^1.32.0",
"@dodoex/dodo-contract-request": "^1.34.0",
"@dodoex/icons": "^2.1.0",
"@emotion/react": "^11.10.0",
"@emotion/styled": "^11.10.0",
Expand Down Expand Up @@ -100,7 +100,7 @@
"recharts": "^2.15.0",
"rmc-date-picker": "^6.0.10",
"tiny-invariant": "^1.1.0",
"zustand": "^4.5.5"
"zustand": "^5.0.0"
},
"peerDependencies": {
"@babel/runtime": ">=7.17.0",
Expand Down Expand Up @@ -159,4 +159,4 @@
"optionalDependencies": {
"pino-pretty": "^13.1.3"
}
}
}
23 changes: 17 additions & 6 deletions packages/dodoex-widgets/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,23 @@ const baseConfig = {
watch: true, // default: false
}),
],
external: [
...Object.keys(pkg.dependencies || {}).filter(
(key) => !['@dodoex/icons'].includes(key),
),
...Object.keys(pkg.peerDependencies || {}),
],
external: (id) => {
const externals = [
...Object.keys(pkg.dependencies || {}).filter(
(key) => !['@dodoex/icons'].includes(key),
),
...Object.keys(pkg.peerDependencies || {}),
'scheduler',
'react-is',
'react-reconciler',
'konva',
'react-konva',
];

return externals.some(
(pkgName) => id === pkgName || id.startsWith(`${pkgName}/`),
);
},
};

const localesConfig = globby.sync('src/locales/*.js').map((inputFile) => ({
Expand Down
11 changes: 11 additions & 0 deletions packages/dodoex-widgets/src/assets/logo/networks/eni.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