@@ -2,13 +2,11 @@ use std::collections::HashMap;
22
33use anyhow:: { bail, Result } ;
44use dojo_world:: contracts:: contract_info:: ContractInfo ;
5- use slot_session:: account_sdk:: account:: session:: account:: SessionAccount ;
6- use slot_session:: account_sdk:: account:: session:: merkle:: MerkleTree ;
7- use slot_session:: account_sdk:: account:: session:: policy:: {
8- CallPolicy , MerkleLeaf , Policy , ProvedPolicy ,
9- } ;
10- use slot_session:: account_sdk:: provider:: CartridgeJsonRpcProvider ;
11- use slot_session:: { FullSessionInfo , PolicyMethod } ;
5+ use slot:: account_sdk:: account:: session:: account:: SessionAccount ;
6+ use slot:: account_sdk:: account:: session:: merkle:: MerkleTree ;
7+ use slot:: account_sdk:: account:: session:: policy:: { CallPolicy , MerkleLeaf , Policy , ProvedPolicy } ;
8+ use slot:: account_sdk:: provider:: CartridgeJsonRpcProvider ;
9+ use slot:: session:: { FullSessionInfo , PolicyMethod } ;
1210use starknet:: core:: types:: Felt ;
1311use starknet:: core:: utils:: get_selector_from_name;
1412use starknet:: macros:: felt;
@@ -40,7 +38,7 @@ pub async fn create_controller(
4038 let chain_id = rpc_provider. chain_id ( ) . await ?;
4139
4240 trace ! ( target: "account::controller" , "Loading Slot credentials." ) ;
43- let credentials = slot_core :: credentials :: Credentials :: load ( ) ?;
41+ let credentials = slot :: credential :: Credentials :: load ( ) ?;
4442 let username = credentials. account . id ;
4543
4644 // Right now, the Cartridge Controller API ensures that there's always a Controller associated
@@ -52,7 +50,7 @@ pub async fn create_controller(
5250 let policies = collect_policies ( contract_address, contracts) ?;
5351
5452 // Check if the session exists, if not create a new one
55- let session_details = match slot_session :: get ( chain_id) ? {
53+ let session_details = match slot :: session :: get ( chain_id) ? {
5654 Some ( session) => {
5755 trace ! ( target: "account::controller" , expires_at = %session. session. inner. expires_at, policies = session. session. proved_policies. len( ) , "Found existing session." ) ;
5856
@@ -69,17 +67,17 @@ pub async fn create_controller(
6967 "Policies have changed. Creating new session."
7068 ) ;
7169
72- let session = slot_session :: create ( rpc_url. clone ( ) , & policies) . await ?;
73- slot_session :: store ( chain_id, & session) ?;
70+ let session = slot :: session :: create ( rpc_url. clone ( ) , & policies) . await ?;
71+ slot :: session :: store ( chain_id, & session) ?;
7472 session
7573 }
7674 }
7775
7876 // Create a new session if not found
7977 None => {
8078 trace ! ( target: "account::controller" , %username, chain = format!( "{chain_id:#}" ) , "Creating new session." ) ;
81- let session = slot_session :: create ( rpc_url. clone ( ) , & policies) . await ?;
82- slot_session :: store ( chain_id, & session) ?;
79+ let session = slot :: session :: create ( rpc_url. clone ( ) , & policies) . await ?;
80+ slot :: session :: store ( chain_id, & session) ?;
8381 session
8482 }
8583 } ;
0 commit comments