mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 03:17:56 +00:00
fix: route P2P deposits and verification to Asset Hub instead of relay chain
DepositModal was building transactions via relay chain API, and all three edge functions (verify-deposit, process-withdraw, process-withdrawal) had RPC endpoints hardcoded or defaulting to the relay chain. This caused deposit verification to fail with "Transaction not yet finalized" and created a chain mismatch with the withdrawal system which operates on Asset Hub. - DepositModal: use assetHubApi instead of api for transfer TX - verify-deposit: RPC_HTTP/RPC_WS default to asset-hub-rpc (env override) - process-withdraw: RPC_ENDPOINT default to asset-hub-rpc (env override) - process-withdrawal: RPC_ENDPOINT default to asset-hub-rpc
This commit is contained in:
@@ -26,8 +26,8 @@ function getCorsHeaders(origin: string | null) {
|
||||
// Platform hot wallet address
|
||||
const PLATFORM_WALLET = '5HN6sFM7TbPQazmfhJP1kU8itw7Tb2A9UML8TwSYRwiN9q5Z'
|
||||
|
||||
// RPC endpoint
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user