add sqlite to cache token metadata

This commit is contained in:
2026-05-14 20:49:54 +08:00
parent 92156f572d
commit cae5d4023f
15 changed files with 296 additions and 8 deletions
+16 -1
View File
@@ -2,15 +2,30 @@ import {
ApplicationMenu,
BrowserView,
BrowserWindow,
PATHS,
Updater,
Utils,
defineElectrobunRPC,
type RPCSchema,
Utils,
} from 'electrobun/bun'
import { inspect } from 'util'
import { getTokenMetadata, getTokensBalances } from './lib/alchemy'
import { tryCatch } from '@koins/utils'
import { getTransactionHistory } from './lib/alchemy/get-transaction-history'
import { migrate } from 'drizzle-orm/bun-sqlite/migrator'
import { db } from './lib/db'
import { join } from 'path'
import { getENV } from './lib/get-env'
const env = getENV()
console.log(env)
if (env.env === 'prod') {
migrate(db, {
migrationsFolder: join(PATHS.RESOURCES_FOLDER, 'app', 'drizzle'),
})
}
const DEV_SERVER_PORT = 5173
const DEV_SERVER_URL = `http://localhost:${DEV_SERVER_PORT}`