Skip to content

Commit 8f7a543

Browse files
committed
chore: back merge develop
2 parents 061709c + 24bded1 commit 8f7a543

22 files changed

+1375
-462
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Patch Changes
66

7-
- Added Mee Client
7+
- Upgrade smart session and rhinestone sdk version
88

99
## 0.0.24
1010

bun.lockb

14 Bytes
Binary file not shown.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
"viem": "2.21.6",
3939
"vitest": "^1.3.1",
4040
"yargs": "^17.7.2",
41-
"@rhinestone/module-sdk": "0.1.28"
41+
"@rhinestone/module-sdk": ">=0.1.0 <=0.2.3"
4242
},
4343
"peerDependencies": {
4444
"typescript": "^5",
4545
"viem": "^2.20.0",
46-
"@rhinestone/module-sdk": "0.1.28"
46+
"@rhinestone/module-sdk": ">=0.1.0 <=0.2.3"
4747
},
4848
"exports": {
4949
".": {

src/sdk/account/toNexusAccount.addresses.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ describe("nexus.account.addresses", async () => {
152152
const testnetAddress = await testnetClient.account.getAddress()
153153
const mainnetAddress = await mainnetClient.account.getAddress()
154154

155-
expect(testnetAddress).not.toBe(mainnetAddress)
155+
expect(testnetAddress).toBe(mainnetAddress)
156156
})
157157

158158
test("should test a mee account", async () => {

src/sdk/clients/createBicoPaymasterClient.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ describe("bico.paymaster", async () => {
145145
bundlerTransport: http(bundlerUrl)
146146
})
147147

148+
console.log(nexusClient.account.address, "nexusClient.account.address")
149+
148150
const initialBalance = await publicClient.getBalance({
149151
address: nexusAccountAddress
150152
})
@@ -160,6 +162,7 @@ describe("bico.paymaster", async () => {
160162
feeTokenAddress: baseSepoliaUSDCAddress
161163
})
162164
const receipt = await nexusClient.waitForUserOperationReceipt({ hash })
165+
163166
expect(receipt.success).toBe("true")
164167

165168
// Get final balance

src/sdk/clients/createNexusSessionClient.test.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isSessionEnabled } from "@rhinestone/module-sdk"
12
import { http, type Address, type Chain, type Hex } from "viem"
23
import type { LocalAccount, PublicClient } from "viem"
34
import { encodeFunctionData } from "viem"
@@ -13,11 +14,7 @@ import {
1314
} from "../../test/testUtils"
1415
import type { MasterClient, NetworkConfig } from "../../test/testUtils"
1516
import { SMART_SESSIONS_ADDRESS, SmartSessionMode } from "../constants"
16-
import {
17-
isPermissionEnabled,
18-
parse,
19-
stringify
20-
} from "../modules/smartSessionsValidator/Helpers"
17+
import { parse, stringify } from "../modules/smartSessionsValidator/Helpers"
2118
import type {
2219
CreateSessionDataParams,
2320
SessionData
@@ -121,7 +118,8 @@ describe("nexus.session.client", async () => {
121118
actionPoliciesInfo: [
122119
{
123120
contractAddress: testAddresses.Counter, // counter address
124-
functionSelector: "0x273ea3e3" as Hex // function selector for increment count
121+
functionSelector: "0x273ea3e3" as Hex, // function selector for increment count,
122+
sudo: true
125123
}
126124
]
127125
}
@@ -157,9 +155,13 @@ describe("nexus.session.client", async () => {
157155

158156
expect(receipt.success).toBe(true)
159157

160-
const isEnabled = await isPermissionEnabled({
158+
const isEnabled = await isSessionEnabled({
161159
client: nexusClient.account.client as PublicClient,
162-
accountAddress: nexusClient.account.address,
160+
account: {
161+
type: "nexus",
162+
address: nexusClient.account.address,
163+
deployedOnChains: [chain.id]
164+
},
163165
permissionId: createSessionsResponse.permissionIds[0]
164166
})
165167
expect(isEnabled).toBe(true)
@@ -243,9 +245,13 @@ describe("nexus.session.client", async () => {
243245
smartSessionUseActions(usePermissionsModule)
244246
)
245247

246-
const isEnabled = await isPermissionEnabled({
248+
const isEnabled = await isSessionEnabled({
247249
client: testClient as unknown as PublicClient,
248-
accountAddress: nexusClient.account.address,
250+
account: {
251+
type: "nexus",
252+
address: nexusClient.account.address,
253+
deployedOnChains: [chain.id]
254+
},
249255
permissionId: sessionData.moduleData.permissionIds[0]
250256
})
251257
expect(isEnabled).toBe(true)

0 commit comments

Comments
 (0)