Skip to content

Commit

Permalink
fix: Show success notification when deploying safe separately
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Feb 12, 2024
1 parent 00c87d2 commit 9629b22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/features/counterfactual/ActivateAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ErrorMessage from '@/components/tx/ErrorMessage'
import { ExecutionMethod, ExecutionMethodSelector } from '@/components/tx/ExecutionMethodSelector'
import useDeployGasLimit from '@/features/counterfactual/hooks/useDeployGasLimit'
import { removeUndeployedSafe, selectUndeployedSafe } from '@/features/counterfactual/store/undeployedSafesSlice'
import { showSubmitNotification } from '@/features/counterfactual/utils'
import { CF_TX_GROUP_KEY, showSubmitNotification } from '@/features/counterfactual/utils'
import useChainId from '@/hooks/useChainId'
import { useCurrentChain } from '@/hooks/useChains'
import useGasPrice, { getTotalFeeFormatted } from '@/hooks/useGasPrice'
Expand All @@ -23,6 +23,7 @@ import useWallet from '@/hooks/wallets/useWallet'
import { useWeb3 } from '@/hooks/wallets/web3'
import { asError } from '@/services/exceptions/utils'
import { isSocialLoginWallet } from '@/services/mpc/SocialLoginModule'
import { txDispatch, TxEvent } from '@/services/tx/txEvents'
import { waitForCreateSafeTx } from '@/services/tx/txMonitor'
import { useAppDispatch, useAppSelector } from '@/store'
import { hasFeature } from '@/utils/chains'
Expand Down Expand Up @@ -82,6 +83,7 @@ const ActivateAccountFlow = () => {

const onSuccess = () => {
dispatch(removeUndeployedSafe({ chainId, address: safeAddress }))
txDispatch(TxEvent.SUCCESS, { groupKey: CF_TX_GROUP_KEY })
}

const onSubmit = (txHash?: string) => {
Expand Down
4 changes: 2 additions & 2 deletions src/features/counterfactual/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getUndeployedSafeInfo = (undeployedSafe: PredictedSafeProps, addres
})
}

const CF_TX_GROUP_KEY = 'cf-tx'
export const CF_TX_GROUP_KEY = 'cf-tx'

export const dispatchTxExecutionAndDeploySafe = async (
safeTx: SafeTransaction,
Expand Down Expand Up @@ -189,7 +189,7 @@ export const showSubmitNotification = (dispatch: AppDispatch, chain?: ChainInfo,
dispatch(
showNotification({
variant: 'info',
groupKey: 'cf-activate-account',
groupKey: CF_TX_GROUP_KEY,
message: 'Safe Account activation in progress',
detailedMessage: 'Your Safe Account will be deployed onchain after the transaction is executed.',
link: link ? { href: link.href, title: link.title } : undefined,
Expand Down

0 comments on commit 9629b22

Please sign in to comment.