read tx history from db cache instead of alchemy api

This commit is contained in:
2026-05-21 17:18:45 +08:00
parent 1aa723db46
commit 8f3495ab40
6 changed files with 50 additions and 57 deletions
@@ -313,11 +313,11 @@ export const EvmWallet = () => {
}
const fetchTxHistory = async () => {
if (!address || !apiKey) {
if (!address) {
transactions = []
return
}
const txs = await electrobun.rpc?.request.fetchTxHistory({
const txs = await electrobun.rpc?.request.fetchCachedTxHistory({
address, chainid: net().chainid,
})
transactions = txs ?? []