Skip to content

Commit 87baac3

Browse files
committed
chores: move constants to single source
1 parent 759c8eb commit 87baac3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

advanced/wallets/react-wallet-v2/src/lib/smart-accounts/SafeSmartAccountLib.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ import {
1919
} from 'viem'
2020
import { MultiKeySigner } from 'viem/_types/experimental/erc7715/types/signer'
2121
import { ModuleType } from 'permissionless/actions/erc7579'
22-
import { MOCK_VALIDATOR_ADDRESSES } from './builders/SmartSessionUtil'
22+
import {
23+
MOCK_VALIDATOR_ADDRESSES,
24+
TRUSTED_SMART_SESSIONS_ATTERSTER_ADDRESS
25+
} from './builders/SmartSessionUtil'
2326
import { Permission } from '@/data/EIP7715Data'
2427
import { getSmartSessionContext } from './builders/ContextBuilderUtil'
2528
import { readContract } from 'viem/actions'
@@ -181,7 +184,7 @@ export class SafeSmartAccountLib extends SmartAccountLib {
181184
console.log('Smart Account do not trusted the attesters of the smartsessions module')
182185
console.log('Enable trusting the attesters of the smartsessions module')
183186
const trustAttestersAction = getTrustAttestersAction({
184-
attesters: ['0xA4C777199658a41688E9488c4EcbD7a2925Cc23A'],
187+
attesters: [TRUSTED_SMART_SESSIONS_ATTERSTER_ADDRESS],
185188
threshold: 1
186189
})
187190
setUpSmartAccountForSmartSession.push(trustAttestersAction)
@@ -260,7 +263,6 @@ export class SafeSmartAccountLib extends SmartAccountLib {
260263
throw new Error('Client not initialized')
261264
}
262265

263-
const TRUSTED_SMART_SESSIONS_ATTERSTER_ADDRESS = '0xA4C777199658a41688E9488c4EcbD7a2925Cc23A'
264266
const attesters = await readContract(this.publicClient, {
265267
address: REGISTRY_ADDRESS,
266268
abi: parseAbi([

advanced/wallets/react-wallet-v2/src/lib/smart-accounts/builders/SmartSessionUtil.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ export const SIMPLE_SIGNER = '0x6ff7E9992160bB25f5c67b0Ce389c28d8faD3Bfb' as Add
2020
export const UNI_ACTION_POLICY = '0x237C7567Ac09D4DB7Dd48852a438F77a6bd65fc4' as Address
2121
export const USAGE_LIMIT_POLICY = '0x1f265E3beDc6ce93e1A36Dc80E1B1c65844F9861' as Address
2222
export const VALUE_LIMIT_POLICY = '0x6F0eC0c77cCAF4c25ff8FF7113D329caAA769688' as Address
23+
24+
export const TRUSTED_SMART_SESSIONS_ATTERSTER_ADDRESS =
25+
'0xA4C777199658a41688E9488c4EcbD7a2925Cc23A' as Address

0 commit comments

Comments
 (0)