Skip to content

feat: preview WBGL bridge fees#37

Open
Sikkra wants to merge 1 commit into
BitgesellOfficial:mainfrom
Sikkra:codex/show-wbgl-fee-preview
Open

feat: preview WBGL bridge fees#37
Sikkra wants to merge 1 commit into
BitgesellOfficial:mainfrom
Sikkra:codex/show-wbgl-fee-preview

Conversation

@Sikkra
Copy link
Copy Markdown

@Sikkra Sikkra commented May 19, 2026

Summary

Adds a WBGL-to-BGL fee preview before the user submits the token transfer. After the bridge service returns the current fee percentage, the send form now calculates the bridge fee and estimated BGL amount from the entered WBGL amount.

This gives users concrete fee visibility before they send WBGL to the custodial bridge address.

Verification

  • CI=true npm test -- --watchAll=false in app/ (1 passed)
  • git diff --check
  • node --openssl-legacy-provider ./node_modules/react-scripts/scripts/build.js in app/ (compiled with existing warnings)

Related: #22
Program reference: BitgesellOfficial/bitgesell#81

USDT-TRC20 payout address if accepted: TPwPFww7zxXFQ7zugo22gktQhckWVarRqi

@MyTH-zyxeon
Copy link
Copy Markdown

Review-assist note for Bitgesell #81 / wbgl-bridge#37:

This looks like a focused, reviewer-friendly UX improvement: the visible diff adds a pre-submit WBGL->BGL fee preview and corresponding test coverage without changing the bridge custody flow itself.

Acceptance checks I would keep explicit before merge/payout:

  • Confirm the preview uses the same fee percentage source the bridge backend applies at submit time, so users do not see a stale or different rate than the actual transfer path.
  • Verify rounding/precision behavior for small WBGL amounts and decimal inputs; the preview should not imply more spendable BGL than the backend ultimately returns.
  • Check empty/zero/error states in WbglToBgl.js so the estimate disappears or degrades safely when the fee lookup fails.
  • Review app/src/components/WbglToBgl.test.js to ensure it covers both the happy path and the no-fee/no-amount path, since this PR is mostly UI-state logic.
  • Treat this as a bridge UX/readiness improvement under the #81 program, not a wallet/key/chain-behavior change.

I did not install dependencies, run the app, connect wallets, submit bridge transactions, or perform any live-chain action. This is a maintainer-facing review checklist based on the visible diff so the queue can move without duplicating contributor work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants