Skip to content

Conversation

@gtg7784
Copy link
Contributor

@gtg7784 gtg7784 commented Jul 15, 2025

Pull Request Summary

Astar portal became incompatible with the XCM V5 upgrade that was deployed on May 9, 2025. The fetchAssetConfigById method in XcmRepository.ts was hard-coded to access the .v3 property from the chain response, but the chain now returns data in .v5 format instead, causing the portal to fail when querying cross-chain asset configurations.

Check list

  • contains breaking changes
  • adds new feature
  • modifies existing feature (bug fix or improvements)
  • relies on other tasks
  • documentation changes
  • tested on mobile devices

This pull request makes the following changes:

Fixes

  • Updated the fetchAssetConfigById method to be version-agnostic by dynamically accessing the first available version key in the response object instead of hard-coding to a specific version.
  • Changed from direct .v3 property access to dynamic version detection
  • Added error handling for cases where no version is found
  • Made the portal compatible with future XCM version upgrades

Improvements

  • Centralized XCM version management in the base XcmRepository class by adding a protected readonly xcmVersion = 'V5' property
  • Replaced all hardcoded 'V5' strings across XCM repository implementations with this.xcmVersion references
  • Enabled version override capability for child repositories when specific chains require different XCM versions
  • Provides single source of truth for XCM version configuration, making future updates easier

Changes

  • Modified fetchAssetConfigById to dynamically detect XCM version from chain response
  • Added xcmVersion property to base repository class
  • Updated all XCM repository implementations to use centralized version management

@gtg7784 gtg7784 requested review from bobo-k2 and impelcrypto July 15, 2025 05:08
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 195327a):

https://astar-apps--pr1483-fix-xcm-v5-compatibi-akr8w45z.web.app

(expires Tue, 22 Jul 2025 05:17:39 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: dd76fe72958fe2910fef9d53f0b4539b82b849db

@gtg7784 gtg7784 force-pushed the fix/xcm-v5-compatibility branch from a1ded03 to 4300de7 Compare July 15, 2025 05:48
- Add protected readonly xcmVersion property to base XcmRepository class
- Replace all hardcoded 'V5' strings with dynamic this.xcmVersion references
- Remove unnecessary intermediate version variable assignments
- Enable version override capability for child repositories when needed

This change provides a single source of truth for XCM version configuration,
making future version updates easier and maintaining consistency across all
XCM repository implementations.
@gtg7784 gtg7784 force-pushed the fix/xcm-v5-compatibility branch from dc8fe93 to ce25960 Compare July 15, 2025 06:04
@gtg7784 gtg7784 changed the base branch from main to release-hotfix July 15, 2025 07:49
gtg7784 and others added 2 commits July 15, 2025 17:19
* fix: updated XCM logix to apply V5

* fix: removed non-used endpoint

* fix: updated Phala endpoint
@gtg7784 gtg7784 merged commit 290a72b into release-hotfix Jul 16, 2025
3 of 5 checks passed
@gtg7784 gtg7784 deleted the fix/xcm-v5-compatibility branch July 16, 2025 04:15
gtg7784 added a commit that referenced this pull request Jul 16, 2025
Revert yarn.lock changes from PR #1483 that converted it to Yarn Berry format.
This maintains compatibility with the existing Yarn v1 setup.
gtg7784 added a commit that referenced this pull request Jul 16, 2025
Revert yarn.lock changes from PR #1483 that converted it to Yarn Berry format.
This maintains compatibility with the existing Yarn v1 setup.
gtg7784 added a commit that referenced this pull request Jul 16, 2025
Revert yarn.lock changes from PR #1483 that converted it to Yarn Berry format.
This maintains compatibility with the existing Yarn v1 setup.
impelcrypto added a commit that referenced this pull request Jul 16, 2025
* Security issue fix (#1472)

* Window open fix

* Resize Astar (L1) connect button

* hotfix: claim staking rewards from EVM wallet (#1474)

* Change zkEVM RPC endpoint (#1457)

* pin firebase-tools version to 13.35.1 in PR preview workflow (#1458)

* pin firebase-tools version to 13.35.1 in PR preview workflow

* pin firebase-tools version to 13.35.1 in staging deployment workflow

* Enable unstake from unregistered (#1461)

* Disable zk bridges and network selection (#1456)

* Disable zk bridges and network selection

* Hide network disabled comments

* hotfix: removed zkEVM links (#1462)

* feat: removed zkEVM links

* feat: updated Astar button

* fix: rollback

* fix: removed unnecessary line (#1464)

* Fix for available staking balance when user has tokens locked in governance (#1466)

* fix: added extra 20% to the gaslimit

* fix: clean up

---------

Co-authored-by: Bobo <[email protected]>
Co-authored-by: Taegeon Alan Go <[email protected]>

* Fix for a bridge tooltip being partially hidden (#1473)

* Fix for unstaking max amount (#1477)

* Change unstake amount to bigint

* Cleanup

* Fix/maintenance mode modal (#1479)

* Maintenance mode modal

* Typo fix

* Go Home

* Maintenance modal go to assets link fix (#1480)

* Fix for maintenance modal dark mode (#1482)

* Fix portal compatibility with XCM V5 upgrade (#1483)

* remove astar 2.0 and tech stack link (#1455)

* Fix `fetchAssetConfigById` for XCM v5 compatibility

* Update all XCM message constructions from V3 to V5

* refactor: centralize XCM version management in base repository

- Add protected readonly xcmVersion property to base XcmRepository class
- Replace all hardcoded 'V5' strings with dynamic this.xcmVersion references
- Remove unnecessary intermediate version variable assignments
- Enable version override capability for child repositories when needed

This change provides a single source of truth for XCM version configuration,
making future version updates easier and maintaining consistency across all
XCM repository implementations.

* update to keep using `V3` for Pendulum and Interlay

* Update to set V5 only for Astar

* fix: updated XCM logix to apply V5 for withdrawal transactions (#1485)

* fix: updated XCM logix to apply V5

* fix: removed non-used endpoint

* fix: updated Phala endpoint

---------

Co-authored-by: Ayumi Takahashi <[email protected]>
Co-authored-by: Roy <[email protected]>

* hotfix: added a banner for Astar Snap deprecation (#1484)

* feat: added a banner for Astar snap

* fix: clean up

* fix: refactoring

* fix: increased minimum transfer amount for Bifrost assets (#1486)

* revert: restore yarn.lock to Yarn v1 format (#1487)

Revert yarn.lock changes from PR #1483 that converted it to Yarn Berry format.
This maintains compatibility with the existing Yarn v1 setup.

---------

Co-authored-by: Bobo <[email protected]>
Co-authored-by: Taegeon Alan Go <[email protected]>
Co-authored-by: Ayumi Takahashi <[email protected]>
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.

4 participants