Skip to content

Commit

Permalink
remove deep tx alert etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut committed Dec 12, 2024
1 parent b8766ef commit 17a16e4
Show file tree
Hide file tree
Showing 9 changed files with 402 additions and 590 deletions.
594 changes: 297 additions & 297 deletions packages/ui/src/components/DeepTxAlert.tsx

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions packages/ui/src/components/Transactions/TransactionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useAccounts } from '../../contexts/AccountsContext'
import { MdOutlineFlare as FlareIcon } from 'react-icons/md'
import Transaction from './Transaction'
import { useMemo } from 'react'
import { DeepTxAlert } from '../DeepTxAlert'
// import { DeepTxAlert } from '../DeepTxAlert'

interface Props {
className?: string
Expand All @@ -25,18 +25,18 @@ const TransactionList = ({ className }: Props) => {
refresh
} = usePendingTx(multisigAddresses)
const { ownAddressList } = useAccounts()
const pendingTxCallData = useMemo(() => {
return Object.values(txWithCallDataByDate)
.reduce((acc, curr) => {
return [...acc, ...curr]
}, [])
.map(({ callData }) => callData)
.filter((a) => !!a) as string[]
}, [txWithCallDataByDate])
// const pendingTxCallData = useMemo(() => {
// return Object.values(txWithCallDataByDate)
// .reduce((acc, curr) => {
// return [...acc, ...curr]
// }, [])
// .map(({ callData }) => callData)
// .filter((a) => !!a) as string[]
// }, [txWithCallDataByDate])

return (
<Box className={className}>
<DeepTxAlert pendingTxCallData={pendingTxCallData} />
{/* <DeepTxAlert pendingTxCallData={pendingTxCallData} /> */}
<h3>Transactions</h3>
{isLoadingPendingTxs && (
<LoaderStyled>
Expand Down
38 changes: 19 additions & 19 deletions packages/ui/src/contexts/ModalsContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import WCSessionProposal from '../components/modals/WalletConnectSessionProposal
import ProposalSigningModal, { SigningModalProps } from '../components/modals/ProposalSigning'
import WalletConnectSigning from '../components/modals/WalletConnectSigning'
import { useMultiProxy } from './MultiProxyContext'
import DeepTxCreationModal, { DeepTxCreationProps } from '../components/modals/DeepTxCreation'
// import DeepTxCreationModal, { DeepTxCreationProps } from '../components/modals/DeepTxCreation'

interface ModalsContextProps {
setIsEditModalOpen: (isOpen: boolean) => void
Expand All @@ -17,8 +17,8 @@ interface ModalsContextProps {
onCloseSendModal: () => void
openWalletConnectSessionModal: ({ sessionProposal }: OpenWCModalParams) => void
onOpenSigningModal: (info: SigningInfo) => void
onOpenDeepTxModal: (info: DeepTxModalInfo) => void
onCloseDeepTxModal: () => void
// onOpenDeepTxModal: (info: DeepTxModalInfo) => void
// onCloseDeepTxModal: () => void
onOpenWalletConnectSigning: (request: SignClientTypes.EventArguments['session_request']) => void
}

Expand All @@ -27,7 +27,7 @@ interface OpenWCModalParams {
}

type SigningInfo = Omit<SigningModalProps, 'onClose'>
type DeepTxModalInfo = Omit<DeepTxCreationProps, 'onClose'>
// type DeepTxModalInfo = Omit<DeepTxCreationProps, 'onClose'>

const ModalsContext = createContext<ModalsContextProps | undefined>(undefined)

Expand All @@ -37,8 +37,8 @@ const ModalsContextProvider = ({ children }: React.PropsWithChildren) => {
const [isSendModalOpen, setIsSendModalOpen] = useState(false)
const [isWCModalOpen, setIsWCModalOpen] = useState(false)
const [isSigningModalOpen, setIsSigningModalOpen] = useState(false)
const [isDeepTxModalOpen, setIsDeepTxModalOpen] = useState(false)
const [deepTxModalInfo, setDeepTxModalInfo] = useState<DeepTxModalInfo | undefined>()
// const [isDeepTxModalOpen, setIsDeepTxModalOpen] = useState(false)
// const [deepTxModalInfo, setDeepTxModalInfo] = useState<DeepTxModalInfo | undefined>()
const [signingModalInfo, setSigningModalInfo] = useState<SigningInfo | undefined>()
const [isOpenWalletConnectSigning, setIsOpenWalletConnectSigning] = useState(false)
const [sendModalPreselection, setSendModalPreselection] = useState<EasyTransferTitle>(
Expand Down Expand Up @@ -100,15 +100,15 @@ const ModalsContextProvider = ({ children }: React.PropsWithChildren) => {
setIsSigningModalOpen(true)
}, [])

const onOpenDeepTxModal = useCallback((info: DeepTxModalInfo) => {
setDeepTxModalInfo(info)
setIsDeepTxModalOpen(true)
}, [])
// const onOpenDeepTxModal = useCallback((info: DeepTxModalInfo) => {
// setDeepTxModalInfo(info)
// setIsDeepTxModalOpen(true)
// }, [])

const onCloseDeepTxModal = useCallback(() => {
setDeepTxModalInfo(undefined)
setIsDeepTxModalOpen(false)
}, [])
// const onCloseDeepTxModal = useCallback(() => {
// setDeepTxModalInfo(undefined)
// setIsDeepTxModalOpen(false)
// }, [])

const onOpenWalletConnectSigning = useCallback(
(request: SignClientTypes.EventArguments['session_request']) => {
Expand All @@ -132,9 +132,9 @@ const ModalsContextProvider = ({ children }: React.PropsWithChildren) => {
onCloseSendModal,
openWalletConnectSessionModal,
onOpenSigningModal,
onOpenWalletConnectSigning,
onOpenDeepTxModal,
onCloseDeepTxModal
onOpenWalletConnectSigning
// onOpenDeepTxModal,
// onCloseDeepTxModal
}}
>
{children}
Expand Down Expand Up @@ -162,7 +162,7 @@ const ModalsContextProvider = ({ children }: React.PropsWithChildren) => {
onSuccess={signingModalInfo.onSuccess}
/>
)}
{isDeepTxModalOpen && deepTxModalInfo && (
{/* {isDeepTxModalOpen && deepTxModalInfo && (
<DeepTxCreationModal
possibleSigners={deepTxModalInfo.possibleSigners}
onClose={onCloseDeepTxModal}
Expand All @@ -171,7 +171,7 @@ const ModalsContextProvider = ({ children }: React.PropsWithChildren) => {
parentMultisigInfo={deepTxModalInfo.parentMultisigInfo}
currentMultisigInvolved={deepTxModalInfo.currentMultisigInvolved}
/>
)}
)} */}
{isOpenWalletConnectSigning && !!walletConnectRequest && (
<WalletConnectSigning
onClose={onCloseWalletConnectSigning}
Expand Down
15 changes: 0 additions & 15 deletions packages/ui/src/gql/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ const documents = {
"query MultisigById($id: String!) {\n accounts(where: {id_eq: $id, isMultisig_eq: true}) {\n id\n threshold\n signatories(limit: 50) {\n id\n signatory {\n id\n address\n }\n }\n }\n}": types.MultisigByIdDocument,
"query MultisigCallsByMultisigId($multisigs: [String!]) {\n multisigCalls(\n limit: 10\n orderBy: timestamp_DESC\n where: {multisig: {id_in: $multisigs}}\n ) {\n id\n blockHash\n callIndex\n timestamp\n }\n}": types.MultisigCallsByMultisigIdDocument,
"query MultisigsAndPureByAccount($accountIds: [String!], $watchedAccountIds: [String!]) {\n accounts(\n where: {AND: [{OR: [{id_in: $watchedAccountIds}, {signatories_some: {signatory: {id_in: $accountIds}}}, {signatories_some: {signatory: {id_in: $watchedAccountIds}}}]}, {OR: [{isMultisig_eq: true}, {isPureProxy_eq: true}]}]}\n ) {\n id\n address\n isMultisig\n isPureProxy\n threshold\n signatories {\n id\n signatory {\n id\n address\n }\n }\n delegateeFor {\n id\n type\n delegator {\n id\n address\n isPureProxy\n }\n delegatee {\n id\n address\n isPureProxy\n }\n }\n delegatorFor {\n id\n type\n delegatee {\n id\n address\n isMultisig\n threshold\n signatories {\n id\n signatory {\n id\n address\n }\n }\n }\n }\n }\n}": types.MultisigsAndPureByAccountDocument,
"query MultisigsByMultisigOrPureSignatories($accountIds: [String!]) {\n accountMultisigs(where: {signatory: {id_in: $accountIds}}, limit: 10) {\n id\n multisig {\n id\n address\n threshold\n signatories(limit: 10) {\n id\n signatory {\n id\n address\n }\n }\n }\n }\n}": types.MultisigsByMultisigOrPureSignatoriesDocument,
"query MultisigsBySignatoriesOrWatched($accountIds: [String!], $watchedAccountIds: [String!]) {\n accountMultisigs(\n where: {OR: [{multisig: {id_in: $watchedAccountIds}}, {signatory: {id_in: $accountIds}}, {signatory: {id_in: $watchedAccountIds}}]}\n limit: 500\n ) {\n id\n multisig {\n id\n address\n threshold\n signatories(limit: 100) {\n id\n signatory {\n id\n address\n }\n }\n delegateeFor(limit: 100) {\n id\n type\n delegator {\n id\n address\n isPureProxy\n }\n }\n }\n }\n}": types.MultisigsBySignatoriesOrWatchedDocument,
"query PureByIds($pureIds: [String!]) {\n accounts(where: {AND: [{id_in: $pureIds}, {isPureProxy_eq: true}]}, limit: 50) {\n id\n address\n delegatorFor(limit: 50) {\n id\n type\n delegatee {\n id\n address\n isMultisig\n threshold\n signatories(limit: 50) {\n id\n signatory {\n id\n address\n }\n }\n }\n }\n }\n}": types.PureByIdsDocument,
};

/**
Expand Down Expand Up @@ -48,18 +45,6 @@ export function graphql(source: "query MultisigCallsByMultisigId($multisigs: [St
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "query MultisigsAndPureByAccount($accountIds: [String!], $watchedAccountIds: [String!]) {\n accounts(\n where: {AND: [{OR: [{id_in: $watchedAccountIds}, {signatories_some: {signatory: {id_in: $accountIds}}}, {signatories_some: {signatory: {id_in: $watchedAccountIds}}}]}, {OR: [{isMultisig_eq: true}, {isPureProxy_eq: true}]}]}\n ) {\n id\n address\n isMultisig\n isPureProxy\n threshold\n signatories {\n id\n signatory {\n id\n address\n }\n }\n delegateeFor {\n id\n type\n delegator {\n id\n address\n isPureProxy\n }\n delegatee {\n id\n address\n isPureProxy\n }\n }\n delegatorFor {\n id\n type\n delegatee {\n id\n address\n isMultisig\n threshold\n signatories {\n id\n signatory {\n id\n address\n }\n }\n }\n }\n }\n}"): (typeof documents)["query MultisigsAndPureByAccount($accountIds: [String!], $watchedAccountIds: [String!]) {\n accounts(\n where: {AND: [{OR: [{id_in: $watchedAccountIds}, {signatories_some: {signatory: {id_in: $accountIds}}}, {signatories_some: {signatory: {id_in: $watchedAccountIds}}}]}, {OR: [{isMultisig_eq: true}, {isPureProxy_eq: true}]}]}\n ) {\n id\n address\n isMultisig\n isPureProxy\n threshold\n signatories {\n id\n signatory {\n id\n address\n }\n }\n delegateeFor {\n id\n type\n delegator {\n id\n address\n isPureProxy\n }\n delegatee {\n id\n address\n isPureProxy\n }\n }\n delegatorFor {\n id\n type\n delegatee {\n id\n address\n isMultisig\n threshold\n signatories {\n id\n signatory {\n id\n address\n }\n }\n }\n }\n }\n}"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "query MultisigsByMultisigOrPureSignatories($accountIds: [String!]) {\n accountMultisigs(where: {signatory: {id_in: $accountIds}}, limit: 10) {\n id\n multisig {\n id\n address\n threshold\n signatories(limit: 10) {\n id\n signatory {\n id\n address\n }\n }\n }\n }\n}"): (typeof documents)["query MultisigsByMultisigOrPureSignatories($accountIds: [String!]) {\n accountMultisigs(where: {signatory: {id_in: $accountIds}}, limit: 10) {\n id\n multisig {\n id\n address\n threshold\n signatories(limit: 10) {\n id\n signatory {\n id\n address\n }\n }\n }\n }\n}"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "query MultisigsBySignatoriesOrWatched($accountIds: [String!], $watchedAccountIds: [String!]) {\n accountMultisigs(\n where: {OR: [{multisig: {id_in: $watchedAccountIds}}, {signatory: {id_in: $accountIds}}, {signatory: {id_in: $watchedAccountIds}}]}\n limit: 500\n ) {\n id\n multisig {\n id\n address\n threshold\n signatories(limit: 100) {\n id\n signatory {\n id\n address\n }\n }\n delegateeFor(limit: 100) {\n id\n type\n delegator {\n id\n address\n isPureProxy\n }\n }\n }\n }\n}"): (typeof documents)["query MultisigsBySignatoriesOrWatched($accountIds: [String!], $watchedAccountIds: [String!]) {\n accountMultisigs(\n where: {OR: [{multisig: {id_in: $watchedAccountIds}}, {signatory: {id_in: $accountIds}}, {signatory: {id_in: $watchedAccountIds}}]}\n limit: 500\n ) {\n id\n multisig {\n id\n address\n threshold\n signatories(limit: 100) {\n id\n signatory {\n id\n address\n }\n }\n delegateeFor(limit: 100) {\n id\n type\n delegator {\n id\n address\n isPureProxy\n }\n }\n }\n }\n}"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "query PureByIds($pureIds: [String!]) {\n accounts(where: {AND: [{id_in: $pureIds}, {isPureProxy_eq: true}]}, limit: 50) {\n id\n address\n delegatorFor(limit: 50) {\n id\n type\n delegatee {\n id\n address\n isMultisig\n threshold\n signatories(limit: 50) {\n id\n signatory {\n id\n address\n }\n }\n }\n }\n }\n}"): (typeof documents)["query PureByIds($pureIds: [String!]) {\n accounts(where: {AND: [{id_in: $pureIds}, {isPureProxy_eq: true}]}, limit: 50) {\n id\n address\n delegatorFor(limit: 50) {\n id\n type\n delegatee {\n id\n address\n isMultisig\n threshold\n signatories(limit: 50) {\n id\n signatory {\n id\n address\n }\n }\n }\n }\n }\n}"];

export function graphql(source: string) {
return (documents as any)[source] ?? {};
Expand Down
Loading

0 comments on commit 17a16e4

Please sign in to comment.