Skip to content

Commit

Permalink
chore: back merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Jan 15, 2025
2 parents 061709c + 24bded1 commit 8f7a543
Show file tree
Hide file tree
Showing 22 changed files with 1,375 additions and 462 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Patch Changes

- Added Mee Client
- Upgrade smart session and rhinestone sdk version

## 0.0.24

Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"viem": "2.21.6",
"vitest": "^1.3.1",
"yargs": "^17.7.2",
"@rhinestone/module-sdk": "0.1.28"
"@rhinestone/module-sdk": ">=0.1.0 <=0.2.3"
},
"peerDependencies": {
"typescript": "^5",
"viem": "^2.20.0",
"@rhinestone/module-sdk": "0.1.28"
"@rhinestone/module-sdk": ">=0.1.0 <=0.2.3"
},
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/account/toNexusAccount.addresses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ describe("nexus.account.addresses", async () => {
const testnetAddress = await testnetClient.account.getAddress()
const mainnetAddress = await mainnetClient.account.getAddress()

expect(testnetAddress).not.toBe(mainnetAddress)
expect(testnetAddress).toBe(mainnetAddress)
})

test("should test a mee account", async () => {
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/clients/createBicoPaymasterClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ describe("bico.paymaster", async () => {
bundlerTransport: http(bundlerUrl)
})

console.log(nexusClient.account.address, "nexusClient.account.address")

const initialBalance = await publicClient.getBalance({
address: nexusAccountAddress
})
Expand All @@ -160,6 +162,7 @@ describe("bico.paymaster", async () => {
feeTokenAddress: baseSepoliaUSDCAddress
})
const receipt = await nexusClient.waitForUserOperationReceipt({ hash })

expect(receipt.success).toBe("true")

// Get final balance
Expand Down
26 changes: 16 additions & 10 deletions src/sdk/clients/createNexusSessionClient.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isSessionEnabled } from "@rhinestone/module-sdk"
import { http, type Address, type Chain, type Hex } from "viem"
import type { LocalAccount, PublicClient } from "viem"
import { encodeFunctionData } from "viem"
Expand All @@ -13,11 +14,7 @@ import {
} from "../../test/testUtils"
import type { MasterClient, NetworkConfig } from "../../test/testUtils"
import { SMART_SESSIONS_ADDRESS, SmartSessionMode } from "../constants"
import {
isPermissionEnabled,
parse,
stringify
} from "../modules/smartSessionsValidator/Helpers"
import { parse, stringify } from "../modules/smartSessionsValidator/Helpers"
import type {
CreateSessionDataParams,
SessionData
Expand Down Expand Up @@ -121,7 +118,8 @@ describe("nexus.session.client", async () => {
actionPoliciesInfo: [
{
contractAddress: testAddresses.Counter, // counter address
functionSelector: "0x273ea3e3" as Hex // function selector for increment count
functionSelector: "0x273ea3e3" as Hex, // function selector for increment count,
sudo: true
}
]
}
Expand Down Expand Up @@ -157,9 +155,13 @@ describe("nexus.session.client", async () => {

expect(receipt.success).toBe(true)

const isEnabled = await isPermissionEnabled({
const isEnabled = await isSessionEnabled({
client: nexusClient.account.client as PublicClient,
accountAddress: nexusClient.account.address,
account: {
type: "nexus",
address: nexusClient.account.address,
deployedOnChains: [chain.id]
},
permissionId: createSessionsResponse.permissionIds[0]
})
expect(isEnabled).toBe(true)
Expand Down Expand Up @@ -243,9 +245,13 @@ describe("nexus.session.client", async () => {
smartSessionUseActions(usePermissionsModule)
)

const isEnabled = await isPermissionEnabled({
const isEnabled = await isSessionEnabled({
client: testClient as unknown as PublicClient,
accountAddress: nexusClient.account.address,
account: {
type: "nexus",
address: nexusClient.account.address,
deployedOnChains: [chain.id]
},
permissionId: sessionData.moduleData.permissionIds[0]
})
expect(isEnabled).toBe(true)
Expand Down
Loading

0 comments on commit 8f7a543

Please sign in to comment.