File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export interface FuelAgentConfig {
2222 googleGeminiApiKey ?: string ;
2323}
2424
25- export class FuelAgent {
25+ export class FuelAgent {
2626 private walletPrivateKey : string ;
2727 private agentExecutor : AgentExecutor ;
2828 private model : keyof typeof modelMapping ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { fileURLToPath } from 'url';
66import { dirname } from 'path' ;
77
88// Get project root directory (will try to save the the dev's project root)
9- const CACHE_DIR = join ( process . cwd ( ) , '.fuel-agent-kit' ) ; // change name or dir maybe?
9+ const CACHE_DIR = join ( process . cwd ( ) , '.fuel-agent-kit' ) ; // change name or dir maybe?
1010const CACHE_FILE = join ( CACHE_DIR , 'verified-assets.json' ) ;
1111const CACHE_TTL = 1000 * 60 * 60 ; // 1 hour in milliseconds
1212
@@ -18,22 +18,22 @@ interface CacheData {
1818export const getVerifiedAssets = async ( ) => {
1919 try {
2020 // Try to read from cache first
21- const cacheExists = await fs . access ( CACHE_FILE )
21+ const cacheExists = await fs
22+ . access ( CACHE_FILE )
2223 . then ( ( ) => true )
2324 . catch ( ( ) => false ) ;
24-
25+
2526 if ( cacheExists ) {
2627 const cacheContent = await fs . readFile ( CACHE_FILE , 'utf-8' ) ;
2728 const cache = JSON . parse ( cacheContent ) as CacheData ;
28-
29+
2930 // Check if cache is still valid
3031 if ( Date . now ( ) - cache . timestamp < CACHE_TTL ) {
3132 return cache . data ;
3233 }
3334 } else {
3435 }
35- } catch ( error ) {
36- }
36+ } catch ( error ) { }
3737
3838 const allAssets = ( await fetch (
3939 'https://verified-assets.fuel.network/assets.json' ,
@@ -46,10 +46,9 @@ export const getVerifiedAssets = async () => {
4646 JSON . stringify ( {
4747 timestamp : Date . now ( ) ,
4848 data : allAssets ,
49- } )
49+ } ) ,
5050 ) ;
51- } catch ( error ) {
52- }
51+ } catch ( error ) { }
5352
5453 return allAssets ;
5554} ;
You can’t perform that action at this time.
0 commit comments