Add multisig pending-operations UI, fix broken multisig address calc, new signing portal

- calculateMultisigAddress was completely broken (hex-decoded an SS58 string
  and never hashed the preimage) - fixed via @pezkuwi/util-crypto's real
  encodeMultiAddress/createKeyMulti, verified against the actual known
  multisig address on-chain.
- ReservesDashboardPage had stale Noter/Berdevk addresses that don't match
  the real signers - centralized as BRIDGE_MULTISIG_SPECIFIC_ADDRESSES.
- USDTBridge withdrawal called assets.burn directly as a single-signer
  extrinsic (always fails - only the multisig is Admin) while only
  checking status.isFinalized (a failed dispatch is still finalized, so it
  silently did nothing) - replaced with the correct transfer-to-custody
  flow the relayer actually watches for.
- New MultisigOperationsPage (/multisig/pending) lists pending calls from
  real Multisig.Multisigs storage and lets any of the 5 signers
  approve/reject with their own wallet extension.
- New standalone sign/ app (deployed separately at
  pezbridge-sign.pex.mom) - a dedicated, gated signing portal for the same
  operations, so signing isn't dependent on this app alone.
This commit is contained in:
Satoshi Qazi Muhammed committed 2026-07-14 07:19:34 -07:00
1 parent fe3c65a706
commit dd58fe9164
24 files changed
+5662 -64

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import { ApiPromise, WsProvider } from '@pezkuwi/api';
// Same endpoint the rest of this ecosystem's tooling (pwap-web, PezbridgeBot) uses for Pezkuwi
// Asset Hub - the chain this multisig lives on.
const RPC_ENDPOINT = 'wss://asset-hub-rpc.pezkuwichain.io';
export function connectApi(): Promise<ApiPromise> {
const provider = new WsProvider(RPC_ENDPOINT);
return ApiPromise.create({ provider });
}
+13
View File
@@ -0,0 +1,13 @@
/**
* Extension-only signer helper - deliberately simpler than pwap-web's get-signer.ts (which also
* supports WalletConnect for mobile). The real 5 multisig signatories operate from desktop/
* server contexts, and this site's whole purpose is to be a minimal, easy-to-audit surface -
* not pulling in the WalletConnect session-management stack keeps that true. Add it back here
* only if a signer genuinely needs to sign from a phone.
*/
import { web3Enable, web3FromAddress } from '@pezkuwi/extension-dapp';
export async function getSigner(address: string) {
await web3Enable('PezBridge Sign');
return web3FromAddress(address);
}
+12
View File
@@ -0,0 +1,12 @@
// Production Rollup alias for vite-plugin-node-polyfills/shims/process (mirrors web/'s copy -
// see its comment for why: Rollup can't resolve the plugin's virtual module during a real
// build, only in dev). IMPORTANT: must not reference the `process` identifier at runtime -
// vite-plugin-node-polyfills rewrites it to `__process_polyfill`, creating a circular TDZ. Use
// bracket notation so the plugin leaves this file alone.
const g: Record<string, unknown> =
typeof globalThis !== 'undefined' ? (globalThis as Record<string, unknown>)
: typeof window !== 'undefined' ? (window as unknown as Record<string, unknown>)
: {};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export default (g['process'] ?? { env: {} }) as any;