Skip to content

Commit

Permalink
chore: unskip sessions test
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Jan 8, 2025
1 parent f6950b4 commit a93c10a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
22 changes: 22 additions & 0 deletions src/sdk/account/toNexusAccount.addresses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
} from "../constants"
import type { NexusAccount } from "./toNexusAccount"
import { getCounterFactualAddress } from "./utils"
import { base, baseSepolia } from "viem/chains"

describe("nexus.account.addresses", async () => {
let network: NetworkConfig
Expand Down Expand Up @@ -126,4 +127,25 @@ describe("nexus.account.addresses", async () => {
)
expect(accountAddress).toBe(someoneElsesNexusAddress)
})

test("should check that mainnet and testnet addresses are different", async () => {
const mainnetClient = await createSmartAccountClient({
signer: eoaAccount,
chain: base,
transport: http(),
bundlerTransport: http(bundlerUrl)
})

const testnetClient = await createSmartAccountClient({
signer: eoaAccount,
chain: baseSepolia,
transport: http(),
bundlerTransport: http(bundlerUrl)
})

const testnetAddress = await testnetClient.account.getAddress()
const mainnetAddress = await mainnetClient.account.getAddress()

expect(testnetAddress).not.toBe(mainnetAddress)
})
})
5 changes: 3 additions & 2 deletions src/test/playground.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ describe.skipIf(!playgroundTrue())("playground", () => {
expect(balanceAfter - balanceBefore).toBe(1n)
})

// Skipped because on base sepolia the attestations for smart sessions have not been created yet
test.skip("should test creating and using a session", async () => {
test("should test creating and using a session", async () => {
const sessionsModule = toSmartSessionsValidator({
account: nexusClient.account,
signer: eoaAccount
Expand Down Expand Up @@ -269,5 +268,7 @@ describe.skipIf(!playgroundTrue())("playground", () => {
await useSmartSessionNexusClient.waitForUserOperationReceipt({
hash: userOpHash
})

expect(receiptThree.success).toBe("true")
})
})

0 comments on commit a93c10a

Please sign in to comment.