Skip to content

Commit

Permalink
[Multichain] fix: Copy owners to address book when replaying safe [SW…
Browse files Browse the repository at this point in the history
…-270] (#4355)

* fix: Copy owners to address book when replaying safe

* Update src/features/multichain/components/CreateSafeOnNewChain/index.tsx

Co-authored-by: Manuel Gellfart <[email protected]>

---------

Co-authored-by: Manuel Gellfart <[email protected]>
  • Loading branch information
usame-algan and schmanu authored Oct 10, 2024
1 parent 606cc03 commit a827466
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/new-safe/create/steps/ReviewStep/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const ReviewStep = ({ data, onSubmit, onBack, setStep }: StepRenderProps<NewSafe
gtmSetChainId(chain.chainId)

if (isCounterfactualEnabled && payMethod === PayMethod.PayLater) {
router?.push({
await router?.push({
pathname: AppRoutes.home,
query: { safe: `${data.networks[0].shortName}:${safeAddress}` },
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import ModalDialog from '@/components/common/ModalDialog'
import NetworkInput from '@/components/common/NetworkInput'
import { updateAddressBook } from '@/components/new-safe/create/logic/address-book'
import ErrorMessage from '@/components/tx/ErrorMessage'
import useAddressBook from '@/hooks/useAddressBook'
import { CREATE_SAFE_CATEGORY, CREATE_SAFE_EVENTS, OVERVIEW_EVENTS, trackEvent } from '@/services/analytics'
import { gtmSetChainId } from '@/services/analytics/gtm'
import { showNotification } from '@/store/notificationsSlice'
Expand Down Expand Up @@ -60,6 +61,7 @@ const ReplaySafeDialog = ({
})
const { handleSubmit, formState } = formMethods
const router = useRouter()
const addressBook = useAddressBook()

const customRpc = useAppSelector(selectRpc)
const dispatch = useAppDispatch()
Expand Down Expand Up @@ -127,7 +129,10 @@ const ReplaySafeDialog = ({
[selectedChain.chainId],
safeAddress,
currentName || '',
safeCreationData.safeAccountConfig.owners.map((owner) => ({ address: owner, name: '' })),
safeCreationData.safeAccountConfig.owners.map((owner) => ({
address: owner,
name: addressBook[owner] || '',
})),
safeCreationData.safeAccountConfig.threshold,
),
)
Expand Down

0 comments on commit a827466

Please sign in to comment.