Skip to content

Commit

Permalink
chore: terminology update
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Dec 5, 2024
1 parent df169a9 commit 9603618
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/sdk/clients/createNexusSessionClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("nexus.session.client", async () => {
let nexusAccountAddress: Address
let sessionKeyAccount: LocalAccount
let sessionPublicKey: Address
let stringifiedSessionData: string
let cachedSessionData: string

let sessionsModule: Module

Expand Down Expand Up @@ -155,7 +155,7 @@ describe("nexus.session.client", async () => {
}
}

stringifiedSessionData = stringify(sessionData)
cachedSessionData = stringify(sessionData)

const receipt = await nexusClient.waitForUserOperationReceipt({
hash: createSessionsResponse.userOpHash
Expand All @@ -172,7 +172,7 @@ describe("nexus.session.client", async () => {
}, 60000)

test("session signer should use session to increment a counter for a user (USE MODE)", async () => {
const sessionData = parse(stringifiedSessionData) as SessionData
const sessionData = parse(cachedSessionData) as SessionData

const counterBefore = await testClient.readContract({
address: testAddresses.Counter,
Expand Down Expand Up @@ -229,7 +229,7 @@ describe("nexus.session.client", async () => {
}, 60000)

test("session signer is not allowed to send unauthorised action", async () => {
const sessionData = parse(stringifiedSessionData) as SessionData
const sessionData = parse(cachedSessionData) as SessionData

const usePermissionsModule = toSmartSessionsValidator({
account: nexusClient.account,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("modules.smartSessions", async () => {
let testClient: MasterClient
let eoaAccount: LocalAccount
let nexusClient: NexusClient
let stringifiedSessionData: string // Session data to be stored by the dApp
let cachedSessionData: string // Session data to be stored by the dApp
let sessionKeyAccount: LocalAccount
let sessionPublicKey: Address

Expand Down Expand Up @@ -261,7 +261,7 @@ describe("modules.smartSessions", async () => {
}
}

stringifiedSessionData = stringify(sessionData)
cachedSessionData = stringify(sessionData)

const receipt = await nexusClient.waitForUserOperationReceipt({
hash: createSessionsResponse.userOpHash
Expand All @@ -277,7 +277,7 @@ describe("modules.smartSessions", async () => {
functionName: "getNumber"
})

const parsedSessionData = parse(stringifiedSessionData) as SessionData
const parsedSessionData = parse(cachedSessionData) as SessionData

const smartSessionNexusClient = await createNexusSessionClient({
chain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe("modules.smartSessions.uni.policy", async () => {
let nexusAccountAddress: Address
let sessionKeyAccount: LocalAccount
let sessionPublicKey: Address
let stringifiedSessionData: string
let cachedSessionData: string

let sessionsModule: Module

Expand Down Expand Up @@ -237,7 +237,7 @@ describe("modules.smartSessions.uni.policy", async () => {
}
}

stringifiedSessionData = stringify(sessionData)
cachedSessionData = stringify(sessionData)

const receipt = await nexusClient.waitForUserOperationReceipt({
hash: createSessionsResponse.userOpHash
Expand All @@ -254,7 +254,7 @@ describe("modules.smartSessions.uni.policy", async () => {
}, 200000)

test("should make use of already enabled session (USE mode) to add balance to MockCallee using a session key", async () => {
const parsedSessionData = parse(stringifiedSessionData) as SessionData
const parsedSessionData = parse(cachedSessionData) as SessionData

const isEnabled = await isPermissionEnabled({
client: nexusClient.account.client as PublicClient,
Expand Down

0 comments on commit 9603618

Please sign in to comment.