@lifi/widget 3.6.0-alpha.5 → 3.6.1
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/App.tsx +3 -3
- package/AppProvider.tsx +2 -1
- package/CHANGELOG.md +23 -0
- package/_esm/App.d.ts +1 -1
- package/_esm/App.js +3 -3
- package/_esm/App.js.map +1 -1
- package/_esm/AppProvider.js +2 -2
- package/_esm/AppProvider.js.map +1 -1
- package/_esm/components/Card/InputCard.d.ts +1 -1
- package/_esm/components/ChainSelect/useChainSelect.js +1 -5
- package/_esm/components/ChainSelect/useChainSelect.js.map +1 -1
- package/_esm/components/FeeBreakdownTooltip.js +1 -4
- package/_esm/components/FeeBreakdownTooltip.js.map +1 -1
- package/_esm/components/Header/EVMDisconnectIconButton.js +4 -5
- package/_esm/components/Header/EVMDisconnectIconButton.js.map +1 -1
- package/_esm/components/Header/Header.style.d.ts +0 -3
- package/_esm/components/Header/Header.style.js +0 -5
- package/_esm/components/Header/Header.style.js.map +1 -1
- package/_esm/components/Header/WalletMenu.js +6 -5
- package/_esm/components/Header/WalletMenu.js.map +1 -1
- package/_esm/components/Header/WalletMenu.style.js +1 -5
- package/_esm/components/Header/WalletMenu.style.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWalletButton.js +16 -6
- package/_esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWalletExpandButton.js +8 -6
- package/_esm/components/SendToWallet/SendToWalletExpandButton.js.map +1 -1
- package/_esm/components/Skeleton/WidgetSkeleton.style.d.ts +1 -1
- package/_esm/components/Step/StepProcess.js +9 -1
- package/_esm/components/Step/StepProcess.js.map +1 -1
- package/_esm/components/TokenList/TokenListItem.js +5 -11
- package/_esm/components/TokenList/TokenListItem.js.map +1 -1
- package/_esm/components/TokenList/VirtualizedTokenList.js +1 -1
- package/_esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/_esm/components/TokenList/types.d.ts +2 -2
- package/_esm/components/TokenRate/TokenRate.js +2 -2
- package/_esm/components/TokenRate/TokenRate.js.map +1 -1
- package/_esm/components/TransactionDetails.js +2 -1
- package/_esm/components/TransactionDetails.js.map +1 -1
- package/_esm/config/version.d.ts +1 -1
- package/_esm/config/version.js +1 -1
- package/_esm/config/version.js.map +1 -1
- package/_esm/hooks/useAccount.d.ts +15 -15
- package/_esm/hooks/useAccount.js +13 -50
- package/_esm/hooks/useAccount.js.map +1 -1
- package/_esm/hooks/useAvailableChains.d.ts +1 -2
- package/_esm/hooks/useAvailableChains.js +8 -9
- package/_esm/hooks/useAvailableChains.js.map +1 -1
- package/_esm/hooks/useChains.d.ts +3 -4
- package/_esm/hooks/useChains.js +3 -5
- package/_esm/hooks/useChains.js.map +1 -1
- package/_esm/hooks/useExplorer.d.ts +10 -1
- package/_esm/hooks/useExplorer.js +4 -1
- package/_esm/hooks/useExplorer.js.map +1 -1
- package/_esm/hooks/useGasSufficiency.js +2 -2
- package/_esm/hooks/useGasSufficiency.js.map +1 -1
- package/_esm/hooks/useHeaderHeight.js +8 -1
- package/_esm/hooks/useHeaderHeight.js.map +1 -1
- package/_esm/hooks/useTokens.js +1 -1
- package/_esm/hooks/useTokens.js.map +1 -1
- package/_esm/hooks/useWallets.d.ts +1 -1
- package/_esm/hooks/useWallets.js +15 -36
- package/_esm/hooks/useWallets.js.map +1 -1
- package/_esm/i18n/en.json +1 -1
- package/_esm/pages/SelectWalletPage/EVMListItemButton.d.ts +2 -1
- package/_esm/pages/SelectWalletPage/EVMListItemButton.js +14 -15
- package/_esm/pages/SelectWalletPage/EVMListItemButton.js.map +1 -1
- package/_esm/pages/SelectWalletPage/SVMListItemButton.js +0 -3
- package/_esm/pages/SelectWalletPage/SVMListItemButton.js.map +1 -1
- package/_esm/pages/SelectWalletPage/SelectWalletPage.js +3 -3
- package/_esm/pages/SelectWalletPage/SelectWalletPage.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.style.d.ts +1 -1
- package/_esm/pages/TransactionDetailsPage/TransferIdCard.js +1 -1
- package/_esm/pages/TransactionDetailsPage/TransferIdCard.js.map +1 -1
- package/_esm/pages/TransactionPage/StatusBottomSheet.js +3 -2
- package/_esm/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
- package/_esm/providers/I18nProvider/types.d.ts +2 -2
- package/_esm/providers/WalletProvider/SDKProviders.js +7 -15
- package/_esm/providers/WalletProvider/SDKProviders.js.map +1 -1
- package/_esm/providers/WalletProvider/WalletProvider.js +1 -2
- package/_esm/providers/WalletProvider/WalletProvider.js.map +1 -1
- package/_esm/providers/WalletProvider/useHasExternalWalletProvider.d.ts +1 -1
- package/_esm/providers/WalletProvider/useHasExternalWalletProvider.js +3 -8
- package/_esm/providers/WalletProvider/useHasExternalWalletProvider.js.map +1 -1
- package/_esm/providers/WidgetProvider/WidgetProvider.js +1 -31
- package/_esm/providers/WidgetProvider/WidgetProvider.js.map +1 -1
- package/_esm/stores/StoreProvider.js +2 -2
- package/_esm/stores/StoreProvider.js.map +1 -1
- package/_esm/stores/form/FormStore.d.ts +6 -1
- package/_esm/stores/form/FormStore.js +69 -18
- package/_esm/stores/form/FormStore.js.map +1 -1
- package/_esm/stores/form/FormUpdater.d.ts +1 -1
- package/_esm/stores/form/FormUpdater.js +36 -18
- package/_esm/stores/form/FormUpdater.js.map +1 -1
- package/_esm/stores/form/URLSearchParamsBuilder.js +44 -4
- package/_esm/stores/form/URLSearchParamsBuilder.js.map +1 -1
- package/_esm/stores/form/createFormStore.js +9 -0
- package/_esm/stores/form/createFormStore.js.map +1 -1
- package/_esm/stores/form/types.d.ts +13 -10
- package/_esm/stores/form/types.js.map +1 -1
- package/_esm/stores/form/useFieldActions.js +1 -0
- package/_esm/stores/form/useFieldActions.js.map +1 -1
- package/_esm/stores/form/useFormRef.d.ts +3 -0
- package/_esm/stores/form/useFormRef.js +51 -0
- package/_esm/stores/form/useFormRef.js.map +1 -0
- package/_esm/stores/form/useTouchedFields.d.ts +6 -6
- package/_esm/stores/settings/types.d.ts +0 -2
- package/_esm/stores/settings/useSendToWalletStore.d.ts +0 -1
- package/_esm/stores/settings/useSendToWalletStore.js +0 -7
- package/_esm/stores/settings/useSendToWalletStore.js.map +1 -1
- package/_esm/themes/createTheme.js +1 -2
- package/_esm/themes/createTheme.js.map +1 -1
- package/_esm/types/widget.d.ts +29 -4
- package/_esm/types/widget.js.map +1 -1
- package/_esm/utils/chainType.js +3 -2
- package/_esm/utils/chainType.js.map +1 -1
- package/_esm/utils/fees.js +5 -9
- package/_esm/utils/fees.js.map +1 -1
- package/_esm/utils/format.js +1 -1
- package/_esm/utils/format.js.map +1 -1
- package/_esm/utils/svm.d.ts +1 -0
- package/_esm/utils/svm.js +11 -0
- package/_esm/utils/svm.js.map +1 -0
- package/components/ChainSelect/useChainSelect.ts +1 -10
- package/components/FeeBreakdownTooltip.tsx +1 -4
- package/components/Header/EVMDisconnectIconButton.tsx +5 -5
- package/components/Header/Header.style.ts +0 -6
- package/components/Header/WalletMenu.style.tsx +1 -5
- package/components/Header/WalletMenu.tsx +5 -6
- package/components/SendToWallet/SendToWalletButton.tsx +23 -13
- package/components/SendToWallet/SendToWalletExpandButton.tsx +10 -10
- package/components/Step/StepProcess.tsx +12 -2
- package/components/TokenList/TokenListItem.tsx +7 -15
- package/components/TokenList/VirtualizedTokenList.tsx +1 -1
- package/components/TokenList/types.ts +2 -2
- package/components/TokenRate/TokenRate.tsx +2 -2
- package/components/TransactionDetails.tsx +4 -1
- package/config/version.ts +1 -1
- package/hooks/useAccount.ts +35 -82
- package/hooks/useAvailableChains.ts +10 -9
- package/hooks/useChains.ts +3 -6
- package/hooks/useExplorer.ts +19 -2
- package/hooks/useGasSufficiency.ts +2 -4
- package/hooks/useHeaderHeight.ts +8 -1
- package/hooks/useTokens.ts +1 -2
- package/hooks/useWallets.ts +20 -41
- package/i18n/en.json +1 -1
- package/package.json +8 -8
- package/pages/SelectWalletPage/EVMListItemButton.tsx +19 -15
- package/pages/SelectWalletPage/SVMListItemButton.tsx +0 -3
- package/pages/SelectWalletPage/SelectWalletPage.tsx +4 -9
- package/pages/TransactionDetailsPage/TransferIdCard.tsx +1 -1
- package/pages/TransactionPage/StatusBottomSheet.tsx +5 -0
- package/providers/I18nProvider/types.ts +2 -2
- package/providers/WalletProvider/SDKProviders.tsx +7 -25
- package/providers/WalletProvider/WalletProvider.tsx +2 -5
- package/providers/WalletProvider/useHasExternalWalletProvider.ts +5 -11
- package/providers/WidgetProvider/WidgetProvider.tsx +1 -39
- package/stores/StoreProvider.tsx +5 -4
- package/stores/form/FormStore.tsx +100 -20
- package/stores/form/FormUpdater.tsx +52 -22
- package/stores/form/URLSearchParamsBuilder.tsx +55 -5
- package/stores/form/createFormStore.ts +9 -0
- package/stores/form/types.ts +14 -10
- package/stores/form/useFieldActions.ts +1 -0
- package/stores/form/useFormRef.ts +69 -0
- package/stores/settings/types.ts +0 -2
- package/stores/settings/useSendToWalletStore.ts +0 -8
- package/themes/createTheme.ts +1 -3
- package/types/widget.ts +46 -3
- package/utils/chainType.ts +3 -2
- package/utils/fees.ts +13 -15
- package/utils/format.ts +1 -1
- package/utils/svm.ts +10 -0
- package/_esm/components/Header/UTXODisconnectIconButton.d.ts +0 -4
- package/_esm/components/Header/UTXODisconnectIconButton.js +0 -13
- package/_esm/components/Header/UTXODisconnectIconButton.js.map +0 -1
- package/_esm/pages/SelectWalletPage/UTXOListItemButton.d.ts +0 -8
- package/_esm/pages/SelectWalletPage/UTXOListItemButton.js +0 -39
- package/_esm/pages/SelectWalletPage/UTXOListItemButton.js.map +0 -1
- package/_esm/providers/WalletProvider/UTXOBaseProvider.d.ts +0 -2
- package/_esm/providers/WalletProvider/UTXOBaseProvider.js +0 -17
- package/_esm/providers/WalletProvider/UTXOBaseProvider.js.map +0 -1
- package/_esm/providers/WalletProvider/UTXOExternalContext.d.ts +0 -1
- package/_esm/providers/WalletProvider/UTXOExternalContext.js +0 -3
- package/_esm/providers/WalletProvider/UTXOExternalContext.js.map +0 -1
- package/_esm/providers/WalletProvider/UTXOProvider.d.ts +0 -3
- package/_esm/providers/WalletProvider/UTXOProvider.js +0 -18
- package/_esm/providers/WalletProvider/UTXOProvider.js.map +0 -1
- package/components/Header/UTXODisconnectIconButton.tsx +0 -24
- package/pages/SelectWalletPage/UTXOListItemButton.tsx +0 -70
- package/providers/WalletProvider/UTXOBaseProvider.tsx +0 -28
- package/providers/WalletProvider/UTXOExternalContext.ts +0 -3
- package/providers/WalletProvider/UTXOProvider.tsx +0 -26
package/App.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { AppProvider } from './AppProvider.js';
|
|
|
7
7
|
import type { WidgetConfig, WidgetProps } from './types/widget.js';
|
|
8
8
|
|
|
9
9
|
export const App = forwardRef<WidgetDrawer, WidgetProps>(
|
|
10
|
-
({ elementRef, open, onClose, integrator, ...other }, ref) => {
|
|
10
|
+
({ elementRef, open, onClose, integrator, formRef, ...other }, ref) => {
|
|
11
11
|
const config: WidgetConfig = useMemo(() => {
|
|
12
12
|
const config = { integrator, ...other, ...other.config };
|
|
13
13
|
if (config.variant === 'drawer') {
|
|
@@ -24,7 +24,7 @@ export const App = forwardRef<WidgetDrawer, WidgetProps>(
|
|
|
24
24
|
|
|
25
25
|
if (config.variant === 'drawer') {
|
|
26
26
|
return (
|
|
27
|
-
<AppProvider config={config}>
|
|
27
|
+
<AppProvider config={config} formRef={formRef}>
|
|
28
28
|
<AppDrawer
|
|
29
29
|
ref={ref}
|
|
30
30
|
elementRef={elementRef}
|
|
@@ -39,7 +39,7 @@ export const App = forwardRef<WidgetDrawer, WidgetProps>(
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
|
-
<AppProvider config={config}>
|
|
42
|
+
<AppProvider config={config} formRef={formRef}>
|
|
43
43
|
<AppDefault />
|
|
44
44
|
</AppProvider>
|
|
45
45
|
);
|
package/AppProvider.tsx
CHANGED
|
@@ -17,6 +17,7 @@ import type { WidgetConfigProps } from './types/widget.js';
|
|
|
17
17
|
export const AppProvider: React.FC<PropsWithChildren<WidgetConfigProps>> = ({
|
|
18
18
|
children,
|
|
19
19
|
config,
|
|
20
|
+
formRef,
|
|
20
21
|
}) => {
|
|
21
22
|
return (
|
|
22
23
|
<QueryClientProvider client={queryClient}>
|
|
@@ -24,7 +25,7 @@ export const AppProvider: React.FC<PropsWithChildren<WidgetConfigProps>> = ({
|
|
|
24
25
|
<WalletProvider>
|
|
25
26
|
<ThemeProvider>
|
|
26
27
|
<I18nProvider>
|
|
27
|
-
<StoreProvider config={config}>
|
|
28
|
+
<StoreProvider config={config} formRef={formRef}>
|
|
28
29
|
<AppRouter>{children}</AppRouter>
|
|
29
30
|
</StoreProvider>
|
|
30
31
|
</I18nProvider>
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [3.6.1](https://github.com/lifinance/widget/compare/v3.6.0...v3.6.1) (2024-09-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* trim amount input ([66eed73](https://github.com/lifinance/widget/commit/66eed7386826e7cf0c249ebd2fdc1930ab550f6c))
|
|
11
|
+
|
|
12
|
+
## [3.6.0](https://github.com/lifinance/widget/compare/v3.5.3...v3.6.0) (2024-09-18)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add voluntary contribution component ([#301](https://github.com/lifinance/widget/issues/301)) ([d0453a7](https://github.com/lifinance/widget/commit/d0453a76b1a429580adafed5e6289bda10c49f8d))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* factor external wallet management into header height calculations ([#300](https://github.com/lifinance/widget/issues/300)) ([b31aaa7](https://github.com/lifinance/widget/commit/b31aaa717fe2a49747b159c2d07b78f6099003df))
|
|
23
|
+
* reactive chain and token properties from config ([#294](https://github.com/lifinance/widget/issues/294)) ([1ff7cfc](https://github.com/lifinance/widget/commit/1ff7cfcc99569c52f05d29a9929f1be06ff53170))
|
|
24
|
+
* use process tx link if no tx hash is available ([#299](https://github.com/lifinance/widget/issues/299)) ([8c59d31](https://github.com/lifinance/widget/commit/8c59d313defdeea4a59df6f06ef40edd5e36c329))
|
|
25
|
+
|
|
26
|
+
### [3.5.3](https://github.com/lifinance/widget/compare/v3.5.2...v3.5.3) (2024-09-12)
|
|
27
|
+
|
|
5
28
|
### [3.5.2](https://github.com/lifinance/widget/compare/v3.5.1...v3.5.2) (2024-09-11)
|
|
6
29
|
|
|
7
30
|
|
package/_esm/App.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { WidgetDrawer } from './AppDrawer.js';
|
|
2
2
|
import type { WidgetConfig } from './types/widget.js';
|
|
3
|
-
export declare const App: import("react").ForwardRefExoticComponent<import("./types/widget.js").WidgetDrawerProps & WidgetConfig & import("./types/widget.js").WidgetConfigPartialProps & import("react").RefAttributes<WidgetDrawer>>;
|
|
3
|
+
export declare const App: import("react").ForwardRefExoticComponent<import("./types/widget.js").WidgetDrawerProps & WidgetConfig & import("./types/widget.js").WidgetConfigPartialProps & import("./types/widget.js").FormRefProps & import("react").RefAttributes<WidgetDrawer>>;
|
package/_esm/App.js
CHANGED
|
@@ -4,7 +4,7 @@ import { forwardRef, useMemo } from 'react';
|
|
|
4
4
|
import { AppDefault } from './AppDefault.js';
|
|
5
5
|
import { AppDrawer } from './AppDrawer.js';
|
|
6
6
|
import { AppProvider } from './AppProvider.js';
|
|
7
|
-
export const App = forwardRef(({ elementRef, open, onClose, integrator, ...other }, ref) => {
|
|
7
|
+
export const App = forwardRef(({ elementRef, open, onClose, integrator, formRef, ...other }, ref) => {
|
|
8
8
|
const config = useMemo(() => {
|
|
9
9
|
const config = { integrator, ...other, ...other.config };
|
|
10
10
|
if (config.variant === 'drawer') {
|
|
@@ -19,8 +19,8 @@ export const App = forwardRef(({ elementRef, open, onClose, integrator, ...other
|
|
|
19
19
|
return config;
|
|
20
20
|
}, [integrator, other]);
|
|
21
21
|
if (config.variant === 'drawer') {
|
|
22
|
-
return (_jsx(AppProvider, { config: config, children: _jsx(AppDrawer, { ref: ref, elementRef: elementRef, config: config, open: open, onClose: onClose, children: _jsx(AppDefault, {}) }) }));
|
|
22
|
+
return (_jsx(AppProvider, { config: config, formRef: formRef, children: _jsx(AppDrawer, { ref: ref, elementRef: elementRef, config: config, open: open, onClose: onClose, children: _jsx(AppDefault, {}) }) }));
|
|
23
23
|
}
|
|
24
|
-
return (_jsx(AppProvider, { config: config, children: _jsx(AppDefault, {}) }));
|
|
24
|
+
return (_jsx(AppProvider, { config: config, formRef: formRef, children: _jsx(AppDefault, {}) }));
|
|
25
25
|
});
|
|
26
26
|
//# sourceMappingURL=App.js.map
|
package/_esm/App.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sourceRoot":"","sources":["../App.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,CAC3B,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../App.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU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/AppProvider.js
CHANGED
|
@@ -9,8 +9,8 @@ import { WalletProvider } from './providers/WalletProvider/WalletProvider.js';
|
|
|
9
9
|
import { WidgetProvider, useWidgetConfig, } from './providers/WidgetProvider/WidgetProvider.js';
|
|
10
10
|
import { StoreProvider } from './stores/StoreProvider.js';
|
|
11
11
|
import { URLSearchParamsBuilder } from './stores/form/URLSearchParamsBuilder.js';
|
|
12
|
-
export const AppProvider = ({ children, config, }) => {
|
|
13
|
-
return (_jsx(QueryClientProvider, { client: queryClient, children: _jsx(WidgetProvider, { config: config, children: _jsx(WalletProvider, { children: _jsx(ThemeProvider, { children: _jsx(I18nProvider, { children: _jsx(StoreProvider, { config: config, children: _jsx(AppRouter, { children: children }) }) }) }) }) }) }));
|
|
12
|
+
export const AppProvider = ({ children, config, formRef, }) => {
|
|
13
|
+
return (_jsx(QueryClientProvider, { client: queryClient, children: _jsx(WidgetProvider, { config: config, children: _jsx(WalletProvider, { children: _jsx(ThemeProvider, { children: _jsx(I18nProvider, { children: _jsx(StoreProvider, { config: config, formRef: formRef, children: _jsx(AppRouter, { children: children }) }) }) }) }) }) }));
|
|
14
14
|
};
|
|
15
15
|
export const AppRouter = ({ children }) => {
|
|
16
16
|
const { buildUrl } = useWidgetConfig();
|
package/_esm/AppProvider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppProvider.js","sourceRoot":"","sources":["../AppProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO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AQ,GAAa,GACnB,GACH,GACD,GACD,GACF,GACG,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAoC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzE,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,CAAC;IACvC,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAC7C,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC;IACzD,OAAO,CACL,MAAC,MAAM,eACJ,QAAQ,EACR,QAAQ,CAAC,CAAC,CAAC,KAAC,sBAAsB,KAAG,CAAC,CAAC,CAAC,IAAI,IACtC,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const InputCard: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").CardOwnProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
2
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
-
}, "children" | "sx" | "style" | "className" | "elevation" | "classes" | "variant" | "square" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & import("./Card.js").CardProps, "title" | "theme" | "color" | "content" | "translate" | "children" | "component" | "ref" | "sx" | "slot" | "style" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "type" | "elevation" | "as" | "classes" | "variant" | "square" | "raised" | "selectionColor" | "indented"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
|
+
}, "children" | "sx" | "style" | "className" | "elevation" | "classes" | "variant" | "square" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & import("./Card.js").CardProps, "title" | "theme" | "color" | "content" | "translate" | "children" | "component" | "ref" | "sx" | "slot" | "style" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "type" | "elevation" | "as" | "classes" | "variant" | "square" | "raised" | "selectionColor" | "indented"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useChains } from '../../hooks/useChains.js';
|
|
2
2
|
import { useSwapOnly } from '../../hooks/useSwapOnly.js';
|
|
3
3
|
import { useToAddressReset } from '../../hooks/useToAddressReset.js';
|
|
4
|
-
import { useHasExternalWalletProvider } from '../../providers/WalletProvider/useHasExternalWalletProvider.js';
|
|
5
4
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js';
|
|
6
5
|
import { useChainOrder } from '../../stores/chains/useChainOrder.js';
|
|
7
6
|
import { FormKeyHelper } from '../../stores/form/types.js';
|
|
@@ -12,10 +11,7 @@ export const useChainSelect = (formType) => {
|
|
|
12
11
|
const chainKey = FormKeyHelper.getChainKey(formType);
|
|
13
12
|
const { onChange } = useFieldController({ name: chainKey });
|
|
14
13
|
const { setFieldValue, getFieldValues } = useFieldActions();
|
|
15
|
-
const {
|
|
16
|
-
const { chains, isLoading, getChainById } = useChains(formType, formType === 'from' && hasExternalProvider
|
|
17
|
-
? availableChainTypes
|
|
18
|
-
: undefined);
|
|
14
|
+
const { chains, isLoading, getChainById } = useChains(formType);
|
|
19
15
|
const [chainOrder, setChainOrder] = useChainOrder(formType);
|
|
20
16
|
const swapOnly = useSwapOnly();
|
|
21
17
|
const { tryResetToAddress } = useToAddressReset();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChainSelect.js","sourceRoot":"","sources":["../../../components/ChainSelect/useChainSelect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useChainSelect.js","sourceRoot":"","sources":["../../../components/ChainSelect/useChainSelect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,eA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M,eAAe,GAAG,CAAC,OAAe,EAAE,EAAE;QAC1C,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClB,IAAI,QAAQ,EAAE,CAAC;YACb,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE;gBACtD,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;QACL,CAAC;QACD,MAAM,QAAQ,GAAG,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAsB,CAAC,EAAE,CAAC;YAClD,aAAa,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC9B,CAAC;QACD,MAAM,SAAS,GAAG,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,SAAuB,CAAC,EAAE,CAAC;YACnD,aAAa,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC/B,CAAC;QACD,aAAa,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;QAEvC,MAAM,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;QAC9C,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;QACxC,IAAI,OAAO,EAAE,CAAC;YACZ,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;QACD,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO;QACL,UAAU;QACV,MAAM;QACN,SAAS;QACT,SAAS;QACT,aAAa;QACb,eAAe;KAChB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -6,8 +6,5 @@ export const FeeBreakdownTooltip = ({ gasCosts, feeCosts, children, }) => {
|
|
|
6
6
|
const { t } = useTranslation();
|
|
7
7
|
return (_jsx(Tooltip, { title: _jsxs(Box, { children: [gasCosts?.length ? (_jsxs(Box, { children: [t('main.fees.network'), getFeeBreakdownTypography(gasCosts, t)] })) : null, feeCosts?.length ? (_jsxs(Box, { mt: 0.5, children: [t('main.fees.provider'), getFeeBreakdownTypography(feeCosts, t)] })) : null] }), sx: { cursor: 'help' }, children: children }));
|
|
8
8
|
};
|
|
9
|
-
export const getFeeBreakdownTypography = (fees, t) => fees.map((fee, index) => (_jsxs(Typography, { fontSize: 12, fontWeight: "500", color: "inherit", children: [t(`format.currency`, { value: fee.amountUSD }), " (",
|
|
10
|
-
value: parseFloat(formatUnits(fee.amount, fee.token.decimals)),
|
|
11
|
-
maximumFractionDigits: Math.min(fee.token.decimals, 9),
|
|
12
|
-
}), ' ', fee.token.symbol, ")"] }, `${fee.token.address}${index}`)));
|
|
9
|
+
export const getFeeBreakdownTypography = (fees, t) => fees.map((fee, index) => (_jsxs(Typography, { fontSize: 12, fontWeight: "500", color: "inherit", children: [t(`format.currency`, { value: fee.amountUSD }), " (", parseFloat(formatUnits(fee.amount, fee.token.decimals))?.toFixed(9), ' ', fee.token.symbol, ")"] }, `${fee.token.address}${index}`)));
|
|
13
10
|
//# sourceMappingURL=FeeBreakdownTooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeeBreakdownTooltip.js","sourceRoot":"","sources":["../../components/FeeBreakdownTooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AASnC,MAAM,CAAC,MAAM,mBAAmB,GAAuC,CAAC,EACtE,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,OAAO,CACL,KAAC,OAAO,IACN,KAAK,EACH,MAAC,GAAG,eACD,QAAQ,EAAE,MAA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K,EACH,MAAC,GAAG,eACD,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAClB,MAAC,GAAG,eACD,CAAC,CAAC,mBAAmB,CAAC,EACtB,yBAAyB,CAAC,QAAQ,EAAE,CAAC,CAAC,IACnC,CACP,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAClB,MAAC,GAAG,IAAC,EAAE,EAAE,GAAG,aACT,CAAC,CAAC,oBAAoB,CAAC,EACvB,yBAAyB,CAAC,QAAQ,EAAE,CAAC,CAAC,IACnC,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EAER,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAErB,QAAQ,GACD,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,IAAqB,EACrB,CAAY,EACZ,EAAE,CACF,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CACvB,MAAC,UAAU,IACT,QAAQ,EAAE,EAAE,EACZ,UAAU,EAAC,KAAK,EAChB,KAAK,EAAC,SAAS,aAGd,CAAC,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,QAC9C,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EACxE,GAAG,CAAC,KAAK,CAAC,MAAM,UAJZ,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,EAAE,CAKxB,CACd,CAAC,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PowerSettingsNewRounded } from '@mui/icons-material';
|
|
3
3
|
import { IconButton } from '@mui/material';
|
|
4
|
-
import {
|
|
5
|
-
import { disconnect } from 'wagmi/actions';
|
|
4
|
+
import { useDisconnect } from 'wagmi';
|
|
6
5
|
export const EVMDisconnectIconButton = ({ connector, }) => {
|
|
7
|
-
const
|
|
8
|
-
return (_jsx(IconButton, { size: "medium", onClick:
|
|
6
|
+
const { disconnect } = useDisconnect();
|
|
7
|
+
return (_jsx(IconButton, { size: "medium", onClick: (e) => {
|
|
9
8
|
e.stopPropagation();
|
|
10
|
-
|
|
9
|
+
disconnect({ connector });
|
|
11
10
|
}, children: _jsx(PowerSettingsNewRounded, {}) }));
|
|
12
11
|
};
|
|
13
12
|
//# sourceMappingURL=EVMDisconnectIconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EVMDisconnectIconButton.js","sourceRoot":"","sources":["../../../components/Header/EVMDisconnectIconButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"EVMDisconnectIconButton.js","sourceRoot":"","sources":["../../../components/Header/EVMDisconnectIconButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,SAAS,GAGV,EAAE,EAAE;IACH,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,EAAE,CAAC;IAEvC,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAC5B,CAAC,YAED,KAAC,uBAAuB,KAAG,GAChB,CACd,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -7,9 +7,6 @@ export declare const Container: import("@emotion/styled").StyledComponent<import
|
|
|
7
7
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
8
8
|
sticky?: boolean;
|
|
9
9
|
}, {}, {}>;
|
|
10
|
-
export declare const ContainerPlaceholder: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
12
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
13
10
|
export declare const WalletButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
14
11
|
ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
15
12
|
}, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "href" | "disabled" | "action" | "size" | "classes" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
@@ -32,11 +32,6 @@ export const Container = styled(Box, {
|
|
|
32
32
|
: {}),
|
|
33
33
|
};
|
|
34
34
|
});
|
|
35
|
-
export const ContainerPlaceholder = styled(Box)(({ theme }) => {
|
|
36
|
-
return {
|
|
37
|
-
...(theme.header?.position === 'fixed' ? {} : { display: 'none' }),
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
35
|
export const WalletButton = styled(Button, {
|
|
41
36
|
shouldForwardProp: (prop) => prop !== 'subvariant',
|
|
42
37
|
})(({ subvariant, theme }) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.style.js","sourceRoot":"","sources":["../../../components/Header/Header.style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,GAAG,EACH,MAAM,EACN,aAAa,EACb,MAAM,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACzD,eAAe,EAAE,aAAa;IAC9B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;IACjC,aAAa,EAAE,KAAK;IACpB,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,UAAU;CACrB,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,EAAE;IACnC,iBAAiB,EAAE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AM;IACf,cAAc,EAAE,eAAe;IAE/B,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,IAAI;QAC3B,wBAAwB,EAAE;YACxB,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;SAC9B;QACD,uBAAuB,EAAE;YACvB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;SAClC;KACF,CAAC;CACH,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACjE,OAAO,EAAE,MAAM;IACf,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;IACvB,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,IAAI;QAC3B,uBAAuB,EAAE;YACvB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;SAClC;KACF,CAAC;CACH,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACzD,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;CACX,CAAC,CAAC,CAAC"}
|
|
@@ -14,7 +14,6 @@ import { AvatarMasked } from '../Avatar/Avatar.style.js';
|
|
|
14
14
|
import { SmallAvatar } from '../SmallAvatar.js';
|
|
15
15
|
import { EVMDisconnectIconButton } from './EVMDisconnectIconButton.js';
|
|
16
16
|
import { SVMDisconnectIconButton } from './SVMDisconnectIconButton.js';
|
|
17
|
-
import { UTXODisconnectIconButton } from './UTXODisconnectIconButton.js';
|
|
18
17
|
export const WalletMenu = ({ onClose }) => {
|
|
19
18
|
const { t } = useTranslation();
|
|
20
19
|
const navigate = useNavigate();
|
|
@@ -33,13 +32,15 @@ export const WalletMenu = ({ onClose }) => {
|
|
|
33
32
|
await navigator.clipboard.writeText(account.address ?? '');
|
|
34
33
|
onClose();
|
|
35
34
|
};
|
|
36
|
-
return (_jsxs(MenuItem, {
|
|
35
|
+
return (_jsxs(MenuItem, { children: [_jsxs(Box, { flex: 1, display: "flex", alignItems: "center", children: [chain?.logoURI ? (_jsx(Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: _jsx(SmallAvatar, { src: chain?.logoURI, alt: chain?.name, children: chain?.name[0] }), sx: { marginRight: 1.5 }, children: _jsx(AvatarMasked, { src: getConnectorIcon(account.connector), alt: account.connector?.name, children: account.connector?.name[0] }) })) : (_jsx(Avatar, { src: getConnectorIcon(account.connector), alt: account.connector?.name, sx: {
|
|
37
36
|
marginRight: 1.5,
|
|
38
|
-
}, children: account.connector?.name[0] })), walletAddress] }), _jsxs(Box, { ml:
|
|
37
|
+
}, children: account.connector?.name[0] })), walletAddress] }), _jsxs(Box, { ml: 1, children: [_jsx(IconButton, { size: "medium", onClick: handleCopyAddress, children: _jsx(ContentCopyRounded, {}) }), _jsx(IconButton, { size: "medium", component: "a", onClick: onClose, href: account.address
|
|
39
38
|
? getAddressLink(account.address, chain)
|
|
40
|
-
: undefined, target: "_blank", children: _jsx(OpenInNewRounded, {}) }), account.chainType === ChainType.EVM ? (_jsx(EVMDisconnectIconButton, { connector: account.connector })) : account.chainType === ChainType.SVM ? (_jsx(SVMDisconnectIconButton, {})) :
|
|
39
|
+
: undefined, target: "_blank", children: _jsx(OpenInNewRounded, {}) }), account.chainType === ChainType.EVM ? (_jsx(EVMDisconnectIconButton, { connector: account.connector })) : account.chainType === ChainType.SVM ? (_jsx(SVMDisconnectIconButton, {})) : null] })] }, account.address));
|
|
41
40
|
}) }), !pathname.includes(navigationRoutes.selectWallet) ? (_jsx(Button, { onClick: connect, fullWidth: true, startIcon: _jsx(PowerSettingsNewRounded, {}), sx: {
|
|
42
41
|
marginTop: 1,
|
|
43
|
-
}, children:
|
|
42
|
+
}, children: accounts.length > 1
|
|
43
|
+
? t(`button.changeWallet`)
|
|
44
|
+
: t(`button.connectWallet`) })) : null] }));
|
|
44
45
|
};
|
|
45
46
|
//# sourceMappingURL=WalletMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletMenu.js","sourceRoot":"","sources":["../../../components/Header/WalletMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,MAAM,EACN,KAAK,EACL,GAAG,EACH,MAAM,EACN,UAAU,EACV,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"WalletMenu.js","sourceRoot":"","sources":["../../../components/Header/WalletMenu.tsx"],"names":[],"mappings":";AA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EAAE,KAAC,uBAAuB,KAAG,EACtC,EAAE,EAAE;oBACF,SAAS,EAAE,CAAC;iBACb,YAEA,QAAQ,CAAC,MAAM,GAAG,CAAC;oBAClB,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC;oBAC1B,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,GACtB,CACV,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -10,15 +10,11 @@ export const WalletMenuContainer = styled(MuiMenu)(({ theme }) => ({
|
|
|
10
10
|
},
|
|
11
11
|
[`& .${menuItemClasses.root}`]: {
|
|
12
12
|
borderRadius: theme.shape.borderRadiusSecondary,
|
|
13
|
-
padding: theme.spacing(1,
|
|
13
|
+
padding: theme.spacing(1, 2, 1, 1),
|
|
14
14
|
[`& .${svgIconClasses.root}`]: {
|
|
15
15
|
fontSize: 20,
|
|
16
16
|
color: theme.palette.text.primary,
|
|
17
17
|
},
|
|
18
|
-
':hover': {
|
|
19
|
-
background: 'none',
|
|
20
|
-
cursor: 'default',
|
|
21
|
-
},
|
|
22
18
|
},
|
|
23
19
|
},
|
|
24
20
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletMenu.style.js","sourceRoot":"","sources":["../../../components/Header/WalletMenu.style.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,IAAI,OAAO,EACf,WAAW,EACX,eAAe,EACf,MAAM,EACN,cAAc,GACf,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC,MAAM,WAAW,CAAC,KAAK,EAAE,CAAC,EAAE;QAC3B,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY;QACtC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;QACjC,SAAS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AAC,qBAAqB;YAC/C,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YAClC,CAAC,MAAM,cAAc,CAAC,IAAI,EAAE,CAAC,EAAE;gBAC7B,QAAQ,EAAE,EAAE;gBACZ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;aAClC;SACF;KACF;CACF,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CloseRounded } from '@mui/icons-material';
|
|
3
3
|
import { Box, Collapse } from '@mui/material';
|
|
4
|
+
import { useEffect, useRef } from 'react';
|
|
4
5
|
import { useTranslation } from 'react-i18next';
|
|
5
6
|
import { useNavigate } from 'react-router-dom';
|
|
6
7
|
import { useAccount } from '../../hooks/useAccount.js';
|
|
@@ -24,7 +25,7 @@ export const SendToWalletButton = (props) => {
|
|
|
24
25
|
const { t } = useTranslation();
|
|
25
26
|
const navigate = useNavigate();
|
|
26
27
|
const { disabledUI, hiddenUI, toAddress, toAddresses } = useWidgetConfig();
|
|
27
|
-
const { showSendToWallet
|
|
28
|
+
const { showSendToWallet } = useSendToWalletStore();
|
|
28
29
|
const [toAddressFieldValue, toChainId, toTokenAddress] = useFieldValues('toAddress', 'toChain', 'toToken');
|
|
29
30
|
const { setFieldValue } = useFieldActions();
|
|
30
31
|
const { selectedBookmark } = useBookmarks();
|
|
@@ -33,8 +34,6 @@ export const SendToWalletButton = (props) => {
|
|
|
33
34
|
const { requiredToAddress } = useToAddressRequirements();
|
|
34
35
|
const disabledToAddress = disabledUI?.includes(DisabledUI.ToAddress);
|
|
35
36
|
const hiddenToAddress = hiddenUI?.includes(HiddenUI.ToAddress);
|
|
36
|
-
const showInstantly = Boolean(!showSendToWalletDirty && toAddress && !hiddenToAddress) ||
|
|
37
|
-
requiredToAddress;
|
|
38
37
|
const address = toAddressFieldValue
|
|
39
38
|
? shortenAddress(toAddressFieldValue)
|
|
40
39
|
: t('sendToWallet.enterAddress', {
|
|
@@ -62,8 +61,7 @@ export const SendToWalletButton = (props) => {
|
|
|
62
61
|
? connectedAccountName || address
|
|
63
62
|
: bookmarkName || connectedAccountName || address;
|
|
64
63
|
const headerSubheader = isConnectedAccount || bookmarkName || connectedAccountName ? address : null;
|
|
65
|
-
const disabledForChanges = Boolean(
|
|
66
|
-
const isSelected = !!toAddressFieldValue && !disabledForChanges;
|
|
64
|
+
const disabledForChanges = Boolean(toAddressFieldValue) && disabledToAddress;
|
|
67
65
|
const handleOnClick = () => {
|
|
68
66
|
navigate(toAddresses?.length
|
|
69
67
|
? navigationRoutes.configuredWallets
|
|
@@ -74,6 +72,18 @@ export const SendToWalletButton = (props) => {
|
|
|
74
72
|
setFieldValue('toAddress', '', { isTouched: true });
|
|
75
73
|
setSelectedBookmark();
|
|
76
74
|
};
|
|
77
|
-
|
|
75
|
+
// The collapse opens instantly on first page load/component mount when there is an address to display
|
|
76
|
+
// After which it needs an animated transition for open and closing.
|
|
77
|
+
// collapseTransitionTime is used specify the transition time for opening and closing
|
|
78
|
+
const collapseTransitionTime = useRef(0);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
// timeout is needed here to push the collapseTransitionTime update to the back of the event loop
|
|
81
|
+
// so that it doesn't fired too quickly
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
collapseTransitionTime.current = 225;
|
|
84
|
+
}, 0);
|
|
85
|
+
}, [collapseTransitionTime]);
|
|
86
|
+
const isOpenCollapse = requiredToAddress || (showSendToWallet && !hiddenToAddress);
|
|
87
|
+
return (_jsx(Collapse, { timeout: collapseTransitionTime.current, in: isOpenCollapse, mountOnEnter: true, unmountOnExit: true, children: _jsxs(Card, { role: "button", onClick: disabledForChanges ? undefined : handleOnClick, sx: { width: '100%', ...props.sx }, children: [_jsx(CardTitle, { required: requiredToAddress, children: t('header.sendToWallet') }), _jsx(Box, { display: "flex", justifyContent: "center", alignItems: "center", children: _jsx(SendToWalletCardHeader, { avatar: _jsx(AccountAvatar, { chainId: chainId, account: matchingConnectedAccount, toAddress: toAddress, empty: !toAddressFieldValue }), title: headerTitle, subheader: headerSubheader, selected: !!toAddressFieldValue || disabledToAddress, action: !!toAddressFieldValue && !disabledForChanges ? (_jsx(CardIconButton, { onClick: clearSelectedBookmark, size: "small", children: _jsx(CloseRounded, { fontSize: "inherit" }) })) : null }) })] }) }));
|
|
78
88
|
};
|
|
79
89
|
//# sourceMappingURL=SendToWalletButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendToWalletButton.js","sourceRoot":"","sources":["../../../components/SendToWallet/SendToWalletButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"SendToWalletButton.js","sourceRoot":"","sources":["../../../components/SendToWallet/SendToWalletButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,EAA0B,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE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H,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EACvD,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,EAAE,aAElC,KAAC,SAAS,IAAC,QAAQ,EAAE,iBAAiB,YACnC,CAAC,CAAC,qBAAqB,CAAC,GACf,EACZ,KAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,cAAc,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,YAC7D,KAAC,sBAAsB,IACrB,MAAM,EACJ,KAAC,aAAa,IACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,wBAAwB,EACjC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,CAAC,mBAAmB,GAC3B,EAEJ,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,CAAC,CAAC,mBAAmB,IAAI,iBAAiB,EACpD,MAAM,EACJ,CAAC,CAAC,mBAAmB,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAC7C,KAAC,cAAc,IAAC,OAAO,EAAE,qBAAqB,EAAE,IAAI,EAAC,OAAO,YAC1D,KAAC,YAAY,IAAC,QAAQ,EAAC,SAAS,GAAG,GACpB,CAClB,CAAC,CAAC,CAAC,IAAI,GAEV,GACE,IACD,GACE,CACZ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -7,30 +7,32 @@ import { useWidgetEvents } from '../../hooks/useWidgetEvents.js';
|
|
|
7
7
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js';
|
|
8
8
|
import { useBookmarkActions } from '../../stores/bookmarks/useBookmarkActions.js';
|
|
9
9
|
import { useFieldActions } from '../../stores/form/useFieldActions.js';
|
|
10
|
+
import { useFieldValues } from '../../stores/form/useFieldValues.js';
|
|
10
11
|
import { useSendToWalletStore } from '../../stores/settings/useSendToWalletStore.js';
|
|
11
12
|
import { WidgetEvent } from '../../types/events.js';
|
|
12
13
|
import { DisabledUI, HiddenUI } from '../../types/widget.js';
|
|
13
14
|
export const SendToWalletExpandButton = () => {
|
|
14
15
|
const { t } = useTranslation();
|
|
15
|
-
const { disabledUI, hiddenUI
|
|
16
|
+
const { disabledUI, hiddenUI } = useWidgetConfig();
|
|
16
17
|
const { setFieldValue } = useFieldActions();
|
|
17
18
|
const { setSelectedBookmark } = useBookmarkActions();
|
|
18
19
|
const emitter = useWidgetEvents();
|
|
19
|
-
const { showSendToWallet,
|
|
20
|
+
const { showSendToWallet, setSendToWallet } = useSendToWalletStore();
|
|
21
|
+
const [toAddressFieldValue] = useFieldValues('toAddress');
|
|
20
22
|
const { requiredToAddress } = useToAddressRequirements();
|
|
21
23
|
if (requiredToAddress || hiddenUI?.includes(HiddenUI.ToAddress)) {
|
|
22
24
|
return null;
|
|
23
25
|
}
|
|
24
|
-
const isActive = showSendToWallet || Boolean(!showSendToWalletDirty && toAddress);
|
|
25
26
|
const handleClick = () => {
|
|
26
|
-
if (
|
|
27
|
+
if (showSendToWallet && !disabledUI?.includes(DisabledUI.ToAddress)) {
|
|
27
28
|
setFieldValue('toAddress', '', { isTouched: true });
|
|
28
29
|
setSelectedBookmark();
|
|
29
30
|
}
|
|
30
|
-
setSendToWallet(!
|
|
31
|
+
setSendToWallet(!showSendToWallet);
|
|
31
32
|
emitter.emit(WidgetEvent.SendToWalletToggled, useSendToWalletStore.getState().showSendToWallet);
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
+
const buttonVariant = showSendToWallet || Boolean(toAddressFieldValue) ? 'contained' : 'text';
|
|
35
|
+
return (_jsx(Tooltip, { title: t('main.sendToWallet'), placement: "bottom-end", children: _jsx(Button, { variant: buttonVariant, onClick: handleClick, sx: {
|
|
34
36
|
minWidth: 48,
|
|
35
37
|
width: 48,
|
|
36
38
|
height: 48,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendToWalletExpandButton.js","sourceRoot":"","sources":["../../../components/SendToWallet/SendToWalletExpandButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,CAAC,MAAM,wBAAwB,GAAa,GAAG,EAAE;IACrD,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"SendToWalletExpandButton.js","sourceRoot":"","sources":["../../../components/SendToWallet/SendToWalletExpandButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,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C,CAAC,gBAAgB,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CACV,WAAW,CAAC,mBAAmB,EAC/B,oBAAoB,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CACjD,CAAC;IACJ,CAAC,CAAC;IAEF,MAAM,aAAa,GACjB,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC;IAE1E,OAAO,CACL,KAAC,OAAO,IAAC,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC,EAAE,SAAS,EAAC,YAAY,YAC5D,KAAC,MAAM,IACL,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE;gBACF,QAAQ,EAAE,EAAE;gBACZ,KAAK,EAAE,EAAE;gBACT,MAAM,EAAE,EAAE;aACX,YAED,KAAC,MAAM,KAAG,GACH,GACD,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -15,7 +15,7 @@ export declare const SkeletonCard: import("@emotion/styled").StyledComponent<imp
|
|
|
15
15
|
}, "children" | "sx" | "style" | "className" | "elevation" | "classes" | "variant" | "square" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
16
16
|
export declare const SkeletonInputCard: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").CardOwnProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
17
17
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
18
|
-
}, "children" | "sx" | "style" | "className" | "elevation" | "classes" | "variant" | "square" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & import("../Card/Card.js").CardProps, "title" | "theme" | "color" | "content" | "translate" | "children" | "component" | "ref" | "sx" | "slot" | "style" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "type" | "elevation" | "as" | "classes" | "variant" | "square" | "raised" | "selectionColor" | "indented"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
18
|
+
}, "children" | "sx" | "style" | "className" | "elevation" | "classes" | "variant" | "square" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & import("../Card/Card.js").CardProps, "title" | "theme" | "color" | "content" | "translate" | "children" | "component" | "ref" | "sx" | "slot" | "style" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "type" | "elevation" | "as" | "classes" | "variant" | "square" | "raised" | "selectionColor" | "indented"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
19
19
|
export declare const SkeletonReviewButtonContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
20
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
21
21
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -11,6 +11,14 @@ export const StepProcess = ({ step, process }) => {
|
|
|
11
11
|
return (_jsxs(Box, { px: 2, py: 1, children: [_jsxs(Box, { sx: {
|
|
12
12
|
display: 'flex',
|
|
13
13
|
alignItems: 'center',
|
|
14
|
-
}, children: [_jsx(CircularProgress, { process: process }), _jsx(Typography, { mx: 2, flex: 1, fontSize: 14, fontWeight: process.error ? 600 : 400, children: title }), process.txHash ? (_jsx(CardIconButton, { size: "small", LinkComponent: Link, href:
|
|
14
|
+
}, children: [_jsx(CircularProgress, { process: process }), _jsx(Typography, { mx: 2, flex: 1, fontSize: 14, fontWeight: process.error ? 600 : 400, children: title }), process.txHash || process.txLink ? (_jsx(CardIconButton, { size: "small", LinkComponent: Link, href: process.txHash
|
|
15
|
+
? getTransactionLink({
|
|
16
|
+
txHash: process.txHash,
|
|
17
|
+
chain: process.chainId,
|
|
18
|
+
})
|
|
19
|
+
: getTransactionLink({
|
|
20
|
+
txLink: process.txLink,
|
|
21
|
+
chain: process.chainId,
|
|
22
|
+
}), target: "_blank", rel: "nofollow noreferrer", children: _jsx(OpenInNewRounded, { fontSize: "inherit" }) })) : null] }), message ? (_jsx(Typography, { ml: 7, fontSize: 14, fontWeight: 500, color: "text.secondary", children: message })) : null] }));
|
|
15
23
|
};
|
|
16
24
|
//# sourceMappingURL=StepProcess.js.map
|