2022-10-14 15:42:53 +00:00
|
|
|
import {
|
|
|
|
AssetDetailsDialog,
|
|
|
|
useAssetDetailsDialogStore,
|
|
|
|
} from '@vegaprotocol/assets';
|
2023-08-03 11:14:35 +00:00
|
|
|
import { VegaConnectDialog, ViewAsDialog } from '@vegaprotocol/wallet';
|
2023-12-12 12:53:20 +00:00
|
|
|
import { useConnectors } from '../lib/vega-connectors';
|
2023-05-18 14:50:15 +00:00
|
|
|
import {
|
|
|
|
Web3ConnectUncontrolledDialog,
|
|
|
|
WithdrawalApprovalDialogContainer,
|
|
|
|
} from '@vegaprotocol/web3';
|
2022-12-13 13:31:28 +00:00
|
|
|
import { WelcomeDialog } from '../components/welcome-dialog';
|
2023-05-19 21:27:45 +00:00
|
|
|
import { RiskMessage } from '../components/welcome-dialog';
|
2022-10-14 15:42:53 +00:00
|
|
|
|
|
|
|
const DialogsContainer = () => {
|
2022-11-23 23:42:22 +00:00
|
|
|
const { isOpen, id, trigger, setOpen } = useAssetDetailsDialogStore();
|
2023-12-12 12:53:20 +00:00
|
|
|
const connectors = useConnectors();
|
2022-10-14 15:42:53 +00:00
|
|
|
return (
|
|
|
|
<>
|
2023-05-19 21:27:45 +00:00
|
|
|
<VegaConnectDialog
|
2023-12-12 12:53:20 +00:00
|
|
|
connectors={connectors}
|
2023-05-19 21:27:45 +00:00
|
|
|
riskMessage={<RiskMessage />}
|
|
|
|
/>
|
2023-12-12 12:53:20 +00:00
|
|
|
<ViewAsDialog connector={connectors.view} />
|
2022-10-14 15:42:53 +00:00
|
|
|
<AssetDetailsDialog
|
2022-11-23 23:42:22 +00:00
|
|
|
assetId={id}
|
2022-10-14 15:42:53 +00:00
|
|
|
trigger={trigger || null}
|
|
|
|
open={isOpen}
|
|
|
|
onChange={setOpen}
|
|
|
|
/>
|
2022-12-13 13:31:28 +00:00
|
|
|
<WelcomeDialog />
|
2022-11-16 14:10:17 +00:00
|
|
|
<Web3ConnectUncontrolledDialog />
|
2023-05-18 14:50:15 +00:00
|
|
|
<WithdrawalApprovalDialogContainer />
|
2022-10-14 15:42:53 +00:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default DialogsContainer;
|