Skip to content

Commit a75289f

Browse files
committed
teamKeyring: use keyring selector
1 parent 226e49d commit a75289f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import { type KeysetWithSecrets, createKeyring } from '@localfirst/crdx'
1+
import { type KeysetWithSecrets } from '@localfirst/crdx'
22
import { type TeamState } from 'team/types.js'
33
import { KeyType } from 'util/types.js'
4-
import { keyMap } from './keyMap.js'
4+
import { keyring } from './keyring.js'
55

66
const { TEAM } = KeyType
77

8-
export const teamKeyring = (state: TeamState, keys: KeysetWithSecrets) => {
9-
const allTeamKeys = keyMap(state, keys)[TEAM][TEAM]
10-
return createKeyring(allTeamKeys)
11-
}
8+
export const teamKeyring = (state: TeamState, keys: KeysetWithSecrets) =>
9+
keyring(state, { type: TEAM, name: TEAM }, keys)

0 commit comments

Comments
 (0)