Skip to content

Commit ca35f6b

Browse files
committed
feat: use new faster auth function
* update `@w3storage/access` dep to make the minimum version the one that has this new auth function * use new polling-based auth function - auth feels muuuuuch faster in local testing
1 parent b9445e3 commit ca35f6b

File tree

7 files changed

+28
-21
lines changed

7 files changed

+28
-21
lines changed

packages/keyring-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"dependencies": {
3434
"@ucanto/interface": "^6.2.0",
3535
"@ucanto/principal": "^5.1.0",
36-
"@web3-storage/access": "^11.0.0"
36+
"@web3-storage/access": "^11.2.0"
3737
},
3838
"eslintConfig": {
3939
"extends": [

packages/react-keyring/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@testing-library/user-event": "^14.4.3",
4040
"@ucanto/interface": "^6.2.0",
4141
"@ucanto/principal": "^5.1.0",
42-
"@web3-storage/access": "^11.0.0"
42+
"@web3-storage/access": "^11.2.0"
4343
},
4444
"peerDependencies": {
4545
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"

packages/react-keyring/src/providers/Keyring.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {
1515
} from '@w3ui/keyring-core'
1616
import type { Agent } from '@web3-storage/access'
1717
import type { Abilities } from '@web3-storage/access/types'
18-
import { authorizeWithSocket } from '@web3-storage/access/agent'
18+
import { authorizeWaitAndClaim } from '@web3-storage/access/agent'
1919
import type {
2020
Capability,
2121
Delegation,
@@ -100,7 +100,7 @@ export function KeyringProvider ({
100100
setRegisterAbortController(controller)
101101

102102
try {
103-
await authorizeWithSocket(agent, email, { signal: controller.signal })
103+
await authorizeWaitAndClaim(agent, email, { signal: controller.signal })
104104
// TODO is there other state that needs to be initialized?
105105
setAccount(email)
106106
const newSpaces = getSpaces(agent)

packages/solid-keyring/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@ucanto/interface": "^6.2.0",
3232
"@ucanto/principal": "^5.1.0",
3333
"@w3ui/keyring-core": "workspace:^",
34-
"@web3-storage/access": "^11.0.0"
34+
"@web3-storage/access": "^11.2.0"
3535
},
3636
"peerDependencies": {
3737
"solid-js": "^1.5.0"

packages/solid-keyring/src/providers/Keyring.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type {
77
} from '@w3ui/keyring-core'
88
import type { Agent } from '@web3-storage/access'
99
import type { Abilities } from '@web3-storage/access/types'
10-
import { authorizeWithSocket } from '@web3-storage/access/agent'
10+
import { authorizeWaitAndClaim } from '@web3-storage/access/agent'
1111

1212
import type { Delegation, Capability, DID, Principal } from '@ucanto/interface'
1313

@@ -95,7 +95,7 @@ export const KeyringProvider: ParentComponent<KeyringProviderProps> = (
9595
setRegisterAbortController(controller)
9696

9797
try {
98-
await authorizeWithSocket(agent, email, { signal: controller.signal })
98+
await authorizeWaitAndClaim(agent, email, { signal: controller.signal })
9999
// TODO is there other state that needs to be initialized?
100100
setState('account', email)
101101
const newSpaces = getSpaces(agent)

packages/vue-keyring/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"devDependencies": {
3636
"@ucanto/interface": "^6.2.0",
3737
"@ucanto/principal": "^5.1.0",
38-
"@web3-storage/access": "^11.0.0"
38+
"@web3-storage/access": "^11.2.0"
3939
},
4040
"eslintConfig": {
4141
"extends": [

pnpm-lock.yaml

Lines changed: 20 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)