fix(electron): use dynamic network config for balance queries

Previously Home.tsx hardcoded testnet RPC for balance queries.
Now uses getCurrentRpcUrl() to respect user's network setting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-01 02:46:39 -08:00
parent c239ac65ee
commit 5f484f6579
1 changed files with 3 additions and 4 deletions

View File

@ -8,6 +8,7 @@ import {
isValidAddress,
isValidAmount,
getCurrentNetwork,
getCurrentRpcUrl,
type PreparedTransaction,
} from '../utils/transaction';
@ -29,9 +30,6 @@ interface ShareWithAddress extends ShareItem {
balanceLoading?: boolean;
}
// Kava Testnet EVM RPC endpoint
const KAVA_TESTNET_RPC = 'https://evm.testnet.kava.io';
/**
* KAVA
* @param address EVM
@ -39,7 +37,8 @@ const KAVA_TESTNET_RPC = 'https://evm.testnet.kava.io';
*/
async function fetchKavaBalance(address: string): Promise<string> {
try {
const response = await fetch(KAVA_TESTNET_RPC, {
const rpcUrl = getCurrentRpcUrl();
const response = await fetch(rpcUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({