@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.
@@ -1,5 +1,5 @@
1
1
  /*eslint-disable*/
2
2
 
3
- var enUS={messages:{".":".","Additional Fee":"Additional Fee","Additional routing fees set by the Widget user":"Additional routing fees set by the Widget user","Approve":"Approve","Approving":"Approving","Are you sure swapping to another chain?":"Are you sure swapping to another chain?","Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote.":"Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote.","Auto switch network":"Auto switch network","Balance:":"Balance:","Basic Fee":"Basic Fee","Best offer":"Best offer","Bridge":"Bridge","Bridge Summary":"Bridge Summary","Cancel":"Cancel","Close":"Close","Confirm":"Confirm","Confirm Bridge":"Confirm Bridge","Confirm swap":"Confirm swap","Confirming":"Confirming","Connect to a wallet":"Connect to a wallet","Connect to your wallet":"Connect to your wallet","Connect to your {0} Wallet":["Connect to your ",["0"]," Wallet"],"Current price impact":"Current price impact","Day":"Day","Days":"Days","Destination":"Destination","Detail":"Detail","Dismiss":"Dismiss","Due to the market condition, market price and estimated price may have a slight difference":"Due to the market condition, market price and estimated price may have a slight difference","Enter an amount":"Enter an amount","Enter the token symbol or address":"Enter the token symbol or address","Estimated Time":"Estimated Time","Estimated service provider fees":"Estimated service provider fees","Estimated transaction time":"Estimated transaction time","Fee":"Fee","Fee includes: Bridge fees + Swap fees. Gas fee not included.":"Fee includes: Bridge fees + Swap fees. Gas fee not included.","Fetching Price...":"Fetching Price...","Fetching best price...":"Fetching best price...","For":"For","ForceStop exception":"ForceStop exception","Gas price is too low, please adjust in your wallet and try again":"Gas price is too low, please adjust in your wallet and try again","High slippage tolerance will increase the success rate of transaction, but might not get the best quote.":"High slippage tolerance will increase the success rate of transaction, but might not get the best quote.","Hour":"Hour","Hours":"Hours","If your transaction time exceeds the deadline, your transaction will be rescinded.":"If your transaction time exceeds the deadline, your transaction will be rescinded.","Insufficient balance":"Insufficient balance","Insufficient cross-chain fees, need at least {0} {1}":["Insufficient cross-chain fees, need at least ",["0"]," ",["1"]],"Insufficient funds - Please retry after depositing more {EtherTokenSymbol} into your wallet":["Insufficient funds - Please retry after depositing more ",["EtherTokenSymbol"]," into your wallet"],"Max":"Max","Maximum slippage do not exceed 50%":"Maximum slippage do not exceed 50%","Min":"Min","Mins":"Mins","Minute":"Minute","Minutes":"Minutes","No ForceStop access":"No ForceStop access","On":"On","Powered by DODO protocol":"Powered by DODO protocol","Price Impact":"Price Impact","Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance.":"Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance.","Price impact reaches <0>{priceImpact}</0>%, accept the quote":["Price impact reaches <0>",["priceImpact"],"</0>%, accept the quote"],"Quote not available":"Quote not available","RPC node data exception":"RPC node data exception","Reset":"Reset","Review Bridge":"Review Bridge","Review Swap":"Review Swap","SELECT TOKEN":"SELECT TOKEN","SafeERC20: low-level call failed. Please contact the DODO team.":"SafeERC20: low-level call failed. Please contact the DODO team.","SafeERC20: low-level call failed. Please log a Zendesk support ticket or contact the DODO team.":"SafeERC20: low-level call failed. Please log a Zendesk support ticket or contact the DODO team.","Second":"Second","Seconds":"Seconds","Select Bridge":"Select Bridge","Select Tokens":"Select Tokens","Select a token":"Select a token","Send to:":"Send to:","Service update, please wait and try again":"Service update, please wait and try again","Settings":"Settings","Slippage":"Slippage","Slippage Tolerance":"Slippage Tolerance","Something went wrong.":"Something went wrong.","Source":"Source","Swap":"Swap","Swap Detail":"Swap Detail","Swap summary":"Swap summary","The current network is inconsistent with the wallet - please switch in wallet":"The current network is inconsistent with the wallet - please switch in wallet","The setting has been switched to bridge mode":"The setting has been switched to bridge mode","The setting has been switched to swap mode":"The setting has been switched to swap mode","This CP has been settled by other addrs":"This CP has been settled by other addrs","This token is on":"This token is on","To":"To","Transaction Deadline":"Transaction Deadline","Transaction Pending":"Transaction Pending","Transaction Time:":"Transaction Time:","Transaction rejected.":"Transaction rejected.","Tx":"Tx","Unable to SETTLE during the cooling-off period":"Unable to SETTLE during the cooling-off period","Unapproved":"Unapproved","Unsupported network - switch to trade":"Unsupported network - switch to trade","User denied transaction signature.":"User denied transaction signature.","View on Etherscan":"View on Etherscan","Wallet incompatibility":"Wallet incompatibility","on":"on","s":"s","{0} confirmed":[["0"]," confirmed"],"{0} pending":[["0"]," pending"],"{DEFAULT_SWAP_DDL} minutes":[["DEFAULT_SWAP_DDL"]," minutes"]}};
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 };
@@ -1,5 +1,5 @@
1
1
  /*eslint-disable*/
2
2
 
3
- var zhCN={messages:{"Additional Fee":"额外手续费","Additional routing fees set by the Widget user":"由Widget项目方设置的额外路由费用","Approve":"代币授权","Approving":"授权中","Attention: High slippage tolerance will increase the success rate of transaction, but might not get the best quote.":"设置一个高容忍滑点可以帮助交易成功,但可能不会得到这么好的价格,请谨慎使用。","Balance:":"余额:","Basic Fee":"基础手续费","Close":"关闭","Confirm swap":"确认交易","Confirming":"确认中","Connect to a wallet":"链接钱包","Connect to your wallet":"链接钱包","Connect to your {0} Wallet":["链接你的第",["0"],"个钱包"],"Current price impact":"当前价格冲击","Dismiss":"不考虑","Due to the market condition, market price and estimated price may have a slight difference":"由于交易规模,市场价格和估计价格之间存在一定差异","Enter an amount":"输入代币数量","Enter the token symbol or address":"输入代币符号或地址","Estimated service provider fees":"估算服务供应商费用","Fetching Price...":"获取价格中...","Fetching best price...":"获取最优价格中...","ForceStop exception":"ForceStop exception","Gas price is too low, please adjust in your wallet and try again":"Gas价格过低, 请调整后重试","High slippage tolerance will increase the success rate of transaction, but might not get the best quote.":"设置一个高容忍滑点可以帮助交易成功,但可能不会得到这么好的价","If your transaction time exceeds the deadline, your transaction will be rescinded.":"如果你的交易被确认的时间超过这个时间,你的交易将被退回。 ","Insufficient balance":"余额不足","Insufficient funds - Please retry after depositing more {EtherTokenSymbol} into your wallet":["余额不足 - 请在钱包充值",["EtherTokenSymbol"],"后重试"],"Max":"Max","Maximum slippage do not exceed 50%":"最大滑点不能超过50%","No ForceStop access":"No ForceStop access","Powered by DODO protocol":"Powered by DODO protocol","Price Impact":"价格冲击","Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance.":"价格冲击超过了你设置的滑点, 请提高滑点后重试","Price impact reaches <0>{priceImpact}</0>%, accept the quote":["价格冲击为<0>",["priceImpact"],"</0>%, 仍接受此报价"],"Quote not available":"没有报价","RPC node data exception":"RPC节点异常","Reset":"重置","Review Swap":"预览交易","SELECT TOKEN":"选择代币","SafeERC20: low-level call failed. Please log a Zendesk support ticket or contact the DODO team.":"SafeERC20: 交易代币合约执行报错,请联系DODO定位","Select Tokens":"选择代币","Select a token":"选择代币","Service update, please wait and try again":"服务升级中, 请等待或重试","Settings":"设置","Slippage":"滑点","Slippage Tolerance":"滑点","Something went wrong.":"发生异常错误.","Swap":"Swap","Swap Detail":"交易详情","Swap summary":"交易预览","This CP has been settled by other addrs":"此众筹池已被其他地址结算","Transaction Deadline":"交易截止时间","Transaction Pending":"交易进行中","Transaction Time:":"交易时长:","Transaction rejected.":"交易被拒绝.","Unable to SETTLE during the cooling-off period":"在冷静期无法进行清算","Unsupported network - switch to trade":"未支持网络 - 请切换后进行交易","User denied transaction signature.":"用户拒绝交易签名.","View on Etherscan":"预览Etherscan","Wallet incompatibility":"钱包不兼容","{0} confirmed":[["0"]," 已确认"],"{0} pending":[["0"]," 等待中"],"{DEFAULT_SWAP_DDL} minutes":[["DEFAULT_SWAP_DDL"]," 分钟"]}};
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;