feat: P2P E2E test suite + edge function RPC fix + balance tx constraint update

- Fix process-withdraw and verify-deposit-telegram to use RPC_ENDPOINT
  env var defaulting to Asset Hub (wss://asset-hub-rpc.pezkuwichain.io)
- Add P2P E2E test script (scripts/p2p-e2e-test.py) covering full flow:
  offer creation, trade accept, payment, escrow release, cancel, visa
  user trade, and withdrawal request
- Update p2p_balance_transactions transaction_type check constraint
  to include withdraw_lock, withdraw_complete, dispute_refund
This commit is contained in:
2026-02-23 21:20:20 +03:00
parent c72782793a
commit 480b5fe96b
4 changed files with 903 additions and 4 deletions
+2 -2
View File
@@ -26,8 +26,8 @@ function getCorsHeaders(origin: string | null): Record<string, string> {
};
}
// RPC endpoint for PezkuwiChain
const RPC_ENDPOINT = 'wss://rpc.pezkuwichain.io';
// RPC endpoint — defaults to Asset Hub where user balances live
const RPC_ENDPOINT = Deno.env.get('RPC_ENDPOINT') || 'wss://asset-hub-rpc.pezkuwichain.io';
// Token decimals
const DECIMALS = 12;