Skip to content

Commit

Permalink
CP-4074 Fix infinite render loop (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
neven-s authored Nov 18, 2022
1 parent 09e7f1e commit 5007b79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/screens/onboarding/useCheckMnemonic.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react'
import { useEffect, useMemo, useState } from 'react'

type WordSelection = {
index: number
Expand All @@ -13,7 +13,7 @@ export type UseCheckMnemonicData = {
}

export function useCheckMnemonic(mnemonic: string): UseCheckMnemonicData {
const mnemonics = mnemonic.split(' ')
const mnemonics = useMemo(() => mnemonic.split(' '), [mnemonic])
const [firstWordSelection, setFirstWordSelection] = useState<WordSelection>({
index: 0,
wordOptions: []
Expand Down

0 comments on commit 5007b79

Please sign in to comment.