Skip to content

Commit

Permalink
fix: use mnemonic name for social wallet safe creation
Browse files Browse the repository at this point in the history
  • Loading branch information
schmanu committed Nov 1, 2023
1 parent 6a1c6bc commit 24a4126
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/new-safe/create/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { type ReactElement, useMemo, useState } from 'react'
import ExternalLink from '@/components/common/ExternalLink'
import { HelpCenterArticle } from '@/config/constants'
import { isSocialLoginWallet } from '@/services/mpc/SocialLoginModule'
import { useMnemonicSafeName } from '@/hooks/useMnemonicName'

export type NewSafeFormData = {
name: string
Expand Down Expand Up @@ -157,17 +158,19 @@ const CreateSafe = () => {

const staticHint = useMemo(() => staticHints[activeStep], [activeStep])

const mnemonicSafeName = useMnemonicSafeName()

// Jump to review screen when using social login
const isSocialLogin = isSocialLoginWallet(wallet?.label)
const initialStep = isSocialLogin ? 2 : 0

const initialData: NewSafeFormData = {
name: '',
name: isSocialLogin ? mnemonicSafeName : '',
owners: [defaultOwner],
threshold: 1,
saltNonce: Date.now(),
}

// Jump to review screen when using social login
const isSocialLogin = isSocialLoginWallet(wallet?.label)
const initialStep = isSocialLogin ? 2 : 0

const onClose = () => {
router.push(AppRoutes.welcome.index)
}
Expand Down

0 comments on commit 24a4126

Please sign in to comment.