Skip to content

Commit

Permalink
fix: RNS Manager being added to recentContacts
Browse files Browse the repository at this point in the history
  • Loading branch information
TravellerOnTheRun committed Aug 31, 2023
1 parent b0c31f7 commit 7c3b9f4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/redux/slices/contactsSlice/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import { getContacts, saveContacts } from 'storage/MainStorage'
import { Contact } from 'shared/types'
import { defaultContacts } from 'store/slices/contactsSlice/constants'
import addresses from 'screens/rnsManager/addresses.json'

const initialState: ContactsState = {
contacts: defaultContacts,
Expand Down Expand Up @@ -50,8 +51,15 @@ const contactsSlice = createSlice({
return state
},
addRecentContact: (state, { payload }: PayloadAction<string>) => {
if (
addresses.fifsAddrRegistrarAddress.toLowerCase() ===
payload.toLowerCase()
) {
return
}

const addressForSearch = payload.toLowerCase()
console.log('addRecentContact', addressForSearch)

if (!state.recentContacts) {
state.recentContacts = []
}
Expand Down

0 comments on commit 7c3b9f4

Please sign in to comment.