SIGN IN SIGN UP
unionlabs / union UNCLAIMED

The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.

0 0 174 Rust

feat(app2): improve user-facing errors (#4550)

- Full rewrite of EVM and Cosmos transaction FSMs for the sake of type
clarity. No more `Promise` and `Exit` usage until execution boundary.
- Fixes to CTA button copy not being updated separately for EVM and
Cosmos in Approval and Submit steps.
- All errors now discriminable and tracked at the type level in Approval
and Submit steps.
- `<ErrorComponent />` additions to guarantee every provided error has a
corresponding human-readable message. <sub>_(also reintroduction of this
component in the transfer flow to replace "Error" CTA)_<sub>
- An extraordinary amount of exhaustive matching.
- Unfinished interpolation functions for dynamic copywrite.
- `SwitchChainError` is now a sum type containing `EvmSwitchChainError`
and `CosmosSwitchChainError` to serve as an example moving forward, such
that errors have unique tags and can be matched appropriately.
- Fixed weird case of balance checking hanging in
[`5ec947f`](https://github.com/unionlabs/union/pull/4550/commits/5ec947fda6f0e6e7edf8462f06afb94a815938d4).
- Fixed issue in `<InsetError />` component causing leading whitespace
before the opening brace.
E
Eric Hegnes committed
88a4c5d283d42b9b57d19bef43fb4a9e44837465
Committed by GitHub <noreply@github.com> on 5/15/2025, 3:11:38 PM