Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .changeset/dark-loops-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'@reown/appkit-experimental': patch
'@reown/appkit-adapter-bitcoin': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': patch
'@reown/appkit-codemod': patch
'@reown/appkit-common': patch
'@reown/appkit-controllers': patch
'@reown/appkit-core': patch
'@reown/appkit-pay': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-testing': patch
'@reown/appkit-ui': patch
'@reown/appkit-wallet': patch
'@reown/appkit-wallet-button': patch
---

Updates Smart Sessions validator with audited OwnableValidator contract by Rhinestone
11,077 changes: 905 additions & 10,172 deletions apps/laboratory/test-results.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ export const SmartSessionsController = {
}
})

const rawResponse = await connectionControllerClient?.grantPermissions([request])
const versionedRequest = { ...request, version: 2 }
const rawResponse = await connectionControllerClient?.grantPermissions([versionedRequest])

// Validate and type guard the response
const response = assertWalletGrantPermissionsResponse(rawResponse)
Expand Down
154 changes: 0 additions & 154 deletions packages/experimental/src/smart-session/grantPermissions.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ export class CosignerService {
const response = await sendCoSignerRequest<
AddPermissionRequest,
AddPermissionResponse,
{ projectId: string }
{ projectId: string; v: string }
>({
url,
request: data,
queryParams: { projectId: this.projectId },
queryParams: { projectId: this.projectId, v: '2' },
headers: { 'Content-Type': 'application/json' }
})
assertAddPermissionResponse(response)
Expand Down
1 change: 1 addition & 0 deletions packages/experimental/src/smart-session/utils/TypeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export type SmartSessionGrantPermissionsRequest = {
type: string
data: Record<string, unknown>
}[]
version?: number
}

export type WalletGrantPermissionsResponse = SmartSessionGrantPermissionsRequest & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ describe('CoSigner API Tests', () => {

const expectedUrl = `${ConstantsUtil.COSIGNER_BASE_URL}/${encodeURIComponent(
mockAddress
)}?projectId=${encodeURIComponent(projectId)}`
)}?projectId=${encodeURIComponent(projectId)}&v=2`

expect(mockFetch).toHaveBeenCalledWith(
expectedUrl,
Expand Down
Loading