Skip to content

enable bnb chain #655

Merged
ebma merged 8 commits into
stagingfrom
chore/enable-bnb-chain
May 19, 2025
Merged

enable bnb chain #655
ebma merged 8 commits into
stagingfrom
chore/enable-bnb-chain

Conversation

@Sharqiewicz
Copy link
Copy Markdown
Member

@Sharqiewicz Sharqiewicz commented May 19, 2025

  • use the currency.decimals defined per chain
  • enable bnb chain on UI

@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2025

Deploy Preview for pendulum-pay ready!

Name Link
🔨 Latest commit 29e8b2a
🔍 Latest deploy log https://app.netlify.com/projects/pendulum-pay/deploys/682b67793bd4080008389ae6
😎 Deploy Preview https://deploy-preview-655--pendulum-pay.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Sharqiewicz Sharqiewicz requested review from a team and Copilot May 19, 2025 15:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables BNB Smart Chain support and aligns chain-specific decimals in both shared configs and the UI.

  • Activates BSC token configuration and network metadata
  • Integrates BSC into the frontend transport and icon mappings
  • Updates UI text and timing for the brlaTeleport phase

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
shared/src/tokens/evm/config.ts Uncommented and restructured BSC EvmToken entries
shared/src/helpers/networks.ts Enabled BSC in the Networks enum and metadata
frontend/src/wagmiConfig.ts Imported bsc, added Alchemy transport for BSC
frontend/src/translations/pt.json Updated Portuguese brlaTeleport message
frontend/src/translations/en.json Updated English brlaTeleport message
frontend/src/pages/progress/index.tsx Changed brlaTeleport phase duration to 5 minutes
frontend/src/hooks/useGetNetworkIcon.tsx Added BSC icon mapping
api/src/api/services/ramp/quote.service.ts Switched to chain-defined decimals, removed !
api/src/api/helpers/contracts.ts Consolidated and relocated utility functions
api/.eslintrc.js Disabled class-methods-use-this rule
Comments suppressed due to low confidence (1)

frontend/src/wagmiConfig.ts:34

  • The networks array is missing bsc, so the BNB Smart Chain won't be available in the frontend. Please add bsc to this list.
const networks = [mainnet, polygon, arbitrum, base, avalanche];

},
[EvmToken.USDCE]: {
assetSymbol: 'USDC.e',
erc20AddressSourceChain: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', // Placeholder, update with actual address
Copy link

Copilot AI May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This placeholder address for USDCE should be replaced with the final contract address or clearly tracked as a TODO to avoid deploying incorrect data.

Suggested change
erc20AddressSourceChain: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', // Placeholder, update with actual address
erc20AddressSourceChain: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', // TODO: Replace with the actual contract address for USDCE

Copilot uses AI. Check for mistakes.
'0x30a300612ab372cc73e53ffe87fb73d62ed68da3', // It does not matter.
amountOut.preciseQuotedAmountOut.rawBalance.toFixed(),
outTokenDetails!,
outTokenDetails,
Copy link

Copilot AI May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed the non-null assertion on outTokenDetails, which may now be undefined here. Consider adding a runtime null check or a guard clause before passing it to createOnrampRouteParams.

Copilot uses AI. Check for mistakes.
@ebma ebma merged commit f72f325 into staging May 19, 2025
5 checks passed
@ebma ebma deleted the chore/enable-bnb-chain branch May 19, 2025 17:30
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.

3 participants