@dodoex/widgets 2.4.3 → 2.4.5-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +6 -6
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/cjs/src/components/Widget/index.d.ts +1 -0
- package/dist/cjs/src/components/WithExecutionDialog/index.d.ts +1 -1
- package/dist/cjs/src/hooks/Submission/useExecution.d.ts +8 -0
- package/dist/cjs/src/hooks/Widget/useInitPropsToRedux.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/src/components/Widget/index.d.ts +1 -0
- package/dist/src/components/WithExecutionDialog/index.d.ts +1 -1
- package/dist/src/hooks/Submission/useExecution.d.ts +8 -0
- package/dist/src/hooks/Widget/useInitPropsToRedux.d.ts +1 -1
- package/package.json +6 -6
package/dist/locales/en-US.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*eslint-disable*/
|
|
2
2
|
|
|
3
|
-
var enUS={messages:
|
|
3
|
+
var enUS={messages:JSON.parse("{\"+Jkdiu\":\"Transaction Time:\",\"+uZnU3\":\"Cross Chain\",\"/jQctM\":\"To\",\"/nzjSF\":[[\"0\"],\" pending\"],\"0QDjxt\":\"Balance:\",\"1QfxQT\":\"Dismiss\",\"4kY4C4\":\"Due to the market condition, market price and estimated price may have a slight difference\",\"4xbbt/\":[[\"0\"],\" confirmed\"],\"54ffaC\":\"The current network is inconsistent with the wallet - please switch in wallet\",\"6+mYrD\":\"Current price impact\",\"6UYTy8\":\"Minute\",\"6XgEPi\":\"Hour\",\"72/M0o\":\"Enter the token symbol or address\",\"7IKPTP\":\"Fee includes: Cross Chain fees + Swap fees. Gas fee not included.\",\"7VpPHA\":\"Confirm\",\"7X+IbB\":\"Powered by DODO protocol\",\"7rpoXw\":\"This token is on\",\"8Z29ZO\":\"Estimated service provider fees\",\"93m8jT\":\"Basic Fee\",\"AghcDJ\":\"Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance.\",\"B0/2ea\":\"s\",\"C1mcuF\":\"This CP has been settled by other addrs\",\"CK1KXz\":\"Max\",\"CMHmbm\":\"Slippage\",\"CkfzUf\":[\"Insufficient funds - Please retry after depositing more \",[\"EtherTokenSymbol\"],\" into your wallet\"],\"EUBGvH\":\"Are you sure swapping to another chain?\",\"Enslfm\":\"Destination\",\"F+sxb9\":\"Unapproved\",\"F9xwHA\":[\"Insufficient cross-chain fees, need at least \",[\"0\"],\" \",[\"1\"]],\"FRBvjQ\":\"Transaction Pending\",\"Fdp03t\":\"on\",\"GAypnX\":\"High slippage tolerance will increase the success rate of transaction, but might not get the best quote.\",\"H7OUPr\":\"Day\",\"HuVZMK\":\"Days\",\"J39pAJ\":\"Additional Fee\",\"JdNn1Y\":\"Fetching best price...\",\"K/Ay/d\":\"Review Swap\",\"K/PgcA\":\"Select Cross Chain\",\"KAmxpM\":\"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote.\",\"KlvBGJ\":\"Select Tokens\",\"NSCBTb\":\"The setting has been switched to swap mode\",\"NVAuTg\":\"Quote not available\",\"OauUE6\":\"Fetching Price...\",\"OfhWJH\":\"Reset\",\"OgKD6h\":\"Best offer\",\"P+K/3O\":\"Confirming\",\"PC9Biq\":[[\"DEFAULT_SWAP_DDL\"],\" minutes\"],\"PLUB/s\":\"Fee\",\"PZqJog\":\"Confirm Cross Chain\",\"Price impact reaches <0>{priceImpact}</0>%, accept the quote\":[\"Price impact reaches <0>\",[\"priceImpact\"],\"</0>%, accept the quote\"],\"QNWt8A\":\"Estimated Time\",\"QR4/RH\":\"Swap summary\",\"S3piC2\":\"Tx\",\"SXnevP\":\"Review Cross Chain\",\"T+qgFw\":\"Price Impact\",\"T0Y2+3\":\"Select a token\",\"TFOxRM\":\"Mins\",\"TizaRy\":\"Wallet incompatibility\",\"Tz0i8g\":\"Settings\",\"Uzr1HF\":[\"Connect to your \",[\"0\"],\" Wallet\"],\"V+rJKF\":\"Seconds\",\"XeovX3\":\"Swap Detail\",\"Xpkm7d\":\"No ForceStop access\",\"YHpbe1\":\"For\",\"Z5HWHd\":\"On\",\"Z7ZXbT\":\"Approve\",\"ZXvy7b\":\"Additional routing fees set by the Widget user\",\"Zm56FI\":\"Maximum slippage do not exceed 50%\",\"agRWc1\":\"Minutes\",\"dEgA5A\":\"Cancel\",\"dI46oG\":\"Auto switch network\",\"eTUF28\":\"Min\",\"em6LzM\":\"Transaction rejected.\",\"g3x+cF\":\"Service update, please wait and try again\",\"gz+9Rb\":\"Gas price is too low, please adjust in your wallet and try again\",\"h4RLFN\":\"RPC node data exception\",\"h5FVz1\":\"Estimated transaction time\",\"h7LgzN\":\"Connect to your wallet\",\"iPMIoT\":\"Enter an amount\",\"j2Uisd\":\"Approving\",\"kf83Ld\":\"Something went wrong.\",\"ku//5b\":\"Second\",\"lQ6r7x\":\"Confirm swap\",\"lqTDfd\":\"Slippage Tolerance\",\"lt8yMa\":\"Send to:\",\"qK7wuW\":\"Unable to SETTLE during the cooling-off period\",\"qLkska\":\"The setting has been switched to cross chain mode\",\"r7ScnQ\":\"Connect to a wallet\",\"rFbNvu\":\"If your transaction time exceeds the deadline, your transaction will be rescinded.\",\"rRDi3Y\":\"Detail\",\"sIPJGT\":\"SELECT TOKEN\",\"tKE4Ak\":\"Cross Chain Summary\",\"tMVAXL\":\"SafeERC20: low-level call failed. Please contact the DODO team.\",\"udsWDJ\":\"Unsupported network - switch to trade\",\"vH2C/2\":\"Swap\",\"wdxz7K\":\"Source\",\"xEbi+8\":\"User denied transaction signature.\",\"yM82Jw\":\"ForceStop exception\",\"yY8wAv\":\"Hours\",\"yz7wBu\":\"Close\",\"zSMRJ/\":\"Transaction Deadline\",\"znqB4T\":\"Insufficient balance\"}")};
|
|
4
4
|
|
|
5
5
|
export { enUS as default };
|
package/dist/locales/zh-CN.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*eslint-disable*/
|
|
2
2
|
|
|
3
|
-
var zhCN={messages:{"
|
|
3
|
+
var zhCN={messages:JSON.parse("{\"+Jkdiu\":\"Transaction Time:\",\"+uZnU3\":\"Cross Chain\",\"/jQctM\":\"To\",\"/nzjSF\":[[\"0\"],\" pending\"],\"0QDjxt\":\"Balance:\",\"1QfxQT\":\"Dismiss\",\"4kY4C4\":\"Due to the market condition, market price and estimated price may have a slight difference\",\"4xbbt/\":[[\"0\"],\" confirmed\"],\"54ffaC\":\"The current network is inconsistent with the wallet - please switch in wallet\",\"6+mYrD\":\"Current price impact\",\"6UYTy8\":\"Minute\",\"6XgEPi\":\"Hour\",\"72/M0o\":\"Enter the token symbol or address\",\"7IKPTP\":\"Fee includes: Cross Chain fees + Swap fees. Gas fee not included.\",\"7VpPHA\":\"Confirm\",\"7X+IbB\":\"Powered by DODO protocol\",\"7rpoXw\":\"This token is on\",\"8Z29ZO\":\"Estimated service provider fees\",\"93m8jT\":\"Basic Fee\",\"AghcDJ\":\"Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance.\",\"B0/2ea\":\"s\",\"C1mcuF\":\"This CP has been settled by other addrs\",\"CK1KXz\":\"Max\",\"CMHmbm\":\"Slippage\",\"CkfzUf\":[\"Insufficient funds - Please retry after depositing more \",[\"EtherTokenSymbol\"],\" into your wallet\"],\"EUBGvH\":\"Are you sure swapping to another chain?\",\"Enslfm\":\"Destination\",\"F+sxb9\":\"Unapproved\",\"F9xwHA\":[\"Insufficient cross-chain fees, need at least \",[\"0\"],\" \",[\"1\"]],\"FRBvjQ\":\"Transaction Pending\",\"Fdp03t\":\"on\",\"GAypnX\":\"High slippage tolerance will increase the success rate of transaction, but might not get the best quote.\",\"H7OUPr\":\"Day\",\"HuVZMK\":\"Days\",\"J39pAJ\":\"Additional Fee\",\"JdNn1Y\":\"Fetching best price...\",\"K/Ay/d\":\"Review Swap\",\"K/PgcA\":\"Select Cross Chain\",\"KAmxpM\":\"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote.\",\"KlvBGJ\":\"Select Tokens\",\"NSCBTb\":\"The setting has been switched to swap mode\",\"NVAuTg\":\"Quote not available\",\"OauUE6\":\"Fetching Price...\",\"OfhWJH\":\"Reset\",\"OgKD6h\":\"Best offer\",\"P+K/3O\":\"Confirming\",\"PC9Biq\":[[\"DEFAULT_SWAP_DDL\"],\" minutes\"],\"PLUB/s\":\"Fee\",\"PZqJog\":\"Confirm Cross Chain\",\"Price impact reaches <0>{priceImpact}</0>%, accept the quote\":[\"Price impact reaches <0>\",[\"priceImpact\"],\"</0>%, accept the quote\"],\"QNWt8A\":\"Estimated Time\",\"QR4/RH\":\"Swap summary\",\"S3piC2\":\"Tx\",\"SXnevP\":\"Review Cross Chain\",\"T+qgFw\":\"Price Impact\",\"T0Y2+3\":\"Select a token\",\"TFOxRM\":\"Mins\",\"TizaRy\":\"Wallet incompatibility\",\"Tz0i8g\":\"Settings\",\"Uzr1HF\":[\"Connect to your \",[\"0\"],\" Wallet\"],\"V+rJKF\":\"Seconds\",\"XeovX3\":\"Swap Detail\",\"Xpkm7d\":\"No ForceStop access\",\"YHpbe1\":\"For\",\"Z5HWHd\":\"On\",\"Z7ZXbT\":\"Approve\",\"ZXvy7b\":\"Additional routing fees set by the Widget user\",\"Zm56FI\":\"Maximum slippage do not exceed 50%\",\"agRWc1\":\"Minutes\",\"dEgA5A\":\"Cancel\",\"dI46oG\":\"Auto switch network\",\"eTUF28\":\"Min\",\"em6LzM\":\"Transaction rejected.\",\"g3x+cF\":\"Service update, please wait and try again\",\"gz+9Rb\":\"Gas price is too low, please adjust in your wallet and try again\",\"h4RLFN\":\"RPC node data exception\",\"h5FVz1\":\"Estimated transaction time\",\"h7LgzN\":\"Connect to your wallet\",\"iPMIoT\":\"Enter an amount\",\"j2Uisd\":\"Approving\",\"kf83Ld\":\"Something went wrong.\",\"ku//5b\":\"Second\",\"lQ6r7x\":\"Confirm swap\",\"lqTDfd\":\"Slippage Tolerance\",\"lt8yMa\":\"Send to:\",\"qK7wuW\":\"Unable to SETTLE during the cooling-off period\",\"qLkska\":\"The setting has been switched to cross chain mode\",\"r7ScnQ\":\"Connect to a wallet\",\"rFbNvu\":\"If your transaction time exceeds the deadline, your transaction will be rescinded.\",\"rRDi3Y\":\"Detail\",\"sIPJGT\":\"SELECT TOKEN\",\"tKE4Ak\":\"Cross Chain Summary\",\"tMVAXL\":\"SafeERC20: low-level call failed. Please contact the DODO team.\",\"udsWDJ\":\"Unsupported network - switch to trade\",\"vH2C/2\":\"Swap\",\"wdxz7K\":\"Source\",\"xEbi+8\":\"User denied transaction signature.\",\"yM82Jw\":\"ForceStop exception\",\"yY8wAv\":\"Hours\",\"yz7wBu\":\"Close\",\"zSMRJ/\":\"Transaction Deadline\",\"znqB4T\":\"Insufficient balance\"}")};
|
|
4
4
|
|
|
5
5
|
export { zhCN as default };
|
|
@@ -23,6 +23,7 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
23
23
|
swapSlippage?: number;
|
|
24
24
|
bridgeSlippage?: number;
|
|
25
25
|
apiServices?: Partial<APIServices>;
|
|
26
|
+
crossChain?: boolean;
|
|
26
27
|
onProviderChanged?: (provider?: any) => void;
|
|
27
28
|
}
|
|
28
29
|
export declare function Widget(props: PropsWithChildren<WidgetProps>): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExecutionProps } from '../../hooks/Submission';
|
|
3
|
-
export default function WithExecutionDialog({ children, ...props }: {
|
|
3
|
+
export default function WithExecutionDialog({ children, executionStatus, ...props }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
} & ExecutionProps): JSX.Element;
|
|
@@ -5,6 +5,14 @@ export interface ExecutionProps {
|
|
|
5
5
|
onTxFail?: (error: Error, data: any) => void;
|
|
6
6
|
onTxSubmit?: (tx: string, data: any) => void;
|
|
7
7
|
onTxSuccess?: (tx: string, data: any) => void;
|
|
8
|
+
executionStatus?: {
|
|
9
|
+
showing?: Showing | null;
|
|
10
|
+
showingDone?: boolean;
|
|
11
|
+
transactionTx?: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
setErrorMessage?: (msg?: string | null) => void;
|
|
14
|
+
closeShowing?: () => void;
|
|
15
|
+
};
|
|
8
16
|
}
|
|
9
17
|
export default function useExecution({ onTxFail, onTxSubmit, onTxSuccess, }?: ExecutionProps): {
|
|
10
18
|
showing: Showing | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { WidgetProps } from '../../components/Widget/';
|
|
2
|
-
export declare function useInitPropsToRedux({ width, height, feeRate, rebateTo, colorMode, apikey, defaultChainId, defaultToToken, defaultFromToken, jsonRpcUrlMap, swapSlippage, bridgeSlippage, apiServices, }: WidgetProps): void;
|
|
2
|
+
export declare function useInitPropsToRedux({ width, height, feeRate, rebateTo, colorMode, apikey, defaultChainId, defaultToToken, defaultFromToken, jsonRpcUrlMap, swapSlippage, bridgeSlippage, apiServices, crossChain, }: WidgetProps): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.5-0",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@emotion/styled": "^11.10.0",
|
|
62
62
|
"@ethersproject/bignumber": "^5.6.2",
|
|
63
63
|
"@ethersproject/contracts": "^5.7.0",
|
|
64
|
-
"@lingui/core": "^3.
|
|
65
|
-
"@lingui/macro": "^3.
|
|
66
|
-
"@lingui/react": "^3.
|
|
64
|
+
"@lingui/core": "^4.3.0",
|
|
65
|
+
"@lingui/macro": "^4.3.0",
|
|
66
|
+
"@lingui/react": "^4.3.0",
|
|
67
67
|
"@reduxjs/toolkit": "^1.6.1",
|
|
68
68
|
"@semantic-release/changelog": "^6.0.1",
|
|
69
69
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@babel/preset-react": "^7.18.6",
|
|
93
93
|
"@babel/preset-typescript": "^7.16.7",
|
|
94
94
|
"@lingui/babel-preset-react": "^2.9.2",
|
|
95
|
-
"@lingui/cli": "^3.
|
|
95
|
+
"@lingui/cli": "^4.3.0",
|
|
96
96
|
"@nomicfoundation/hardhat-network-helpers": "^1.0.6",
|
|
97
97
|
"@nomiclabs/hardhat-ethers": "^2.1.1",
|
|
98
98
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -127,4 +127,4 @@
|
|
|
127
127
|
"ts-jest": "^29.0.1",
|
|
128
128
|
"typescript": "^4.7.3"
|
|
129
129
|
}
|
|
130
|
-
}
|
|
130
|
+
}
|