Commit Graph
2 Commits
Author SHA1 Message Date
SatoshiQaziMuhammed 11fbe41a8a build(web,sign): drop vite-plugin-node-polyfills and its elliptic dependency (#70)
vite-plugin-node-polyfills depends on node-stdlib-browser, which always
installs crypto-browserify -> browserify-sign/create-ecdh -> elliptic
(GHSA-848j-6mx2-7j84, no patched release). No module in either bundle
ever imported the crypto polyfill; what the plugin actually provided was
three injected globals and the `events` alias.

sign: the only call sites were @pezkuwi/x-global (`global`, after a
globalThis check), shared/lib env helpers (`process`, typeof-guarded) and
bn.js's optional Buffer probe (try/catch; BN#toBuffer has no callers).
The plugin, the process shim alias and the `buffer` pre-bundle entry are
removed outright.

web: WalletConnect calls `Buffer.from` unguarded and imports `events`,
so the globals are still needed. src/lib/node-globals.ts now provides
Buffer/global/process, injected as scoped imports by @rollup/plugin-inject
in the build and by esbuild's inject in the dev pre-bundle - the same 18
modules the plugin injected into, and still nothing written onto
globalThis. `events` becomes a direct dependency. The unused shim files,
the vitest shim aliases and the `elliptic` override are removed.
2026-11-15 05:28:59 +04:00
Satoshi Qazi Muhammed dd58fe9164 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.
2026-07-14 07:19:34 -07:00