Add manual chain export/import RPC endpoints and fix chain_id in wallet adapter
- Add /export-chain endpoint to export full blockchain state (blocks, accounts, transactions) as JSON - Add /import-chain endpoint to import chain state with backup and data clearing - Add /force-sync endpoint to trigger reorg by fetching and importing peer's chain state - Fix duplicate import_block implementation (remove redundant async with _import_lock block) - Fix wallet adapter to use chain_id=ait-testnet instead of ait
This commit is contained in:
@@ -311,7 +311,7 @@ class DualModeWalletAdapter:
|
||||
|
||||
rpc_url = self.config.blockchain_rpc_url
|
||||
try:
|
||||
resp = httpx.get(f"{rpc_url}/rpc/getBalance/{from_address}?chain_id=ait-mainnet", timeout=5)
|
||||
resp = httpx.get(f"{rpc_url}/rpc/account/{from_address}?chain_id=ait-testnet", timeout=5)
|
||||
if resp.status_code == 200:
|
||||
data = resp.json()
|
||||
chain_balance = data.get("balance", 0)
|
||||
|
||||
Reference in New Issue
Block a user