Skip to content

Conversation

@satoshiotomakan
Copy link
Collaborator

This pull request refactors how fee asset IDs are handled in the Polkadot signing flow, introducing a new FeeAssetId enum to distinguish between native and asset-based transaction fees. It also adds support for using the ChargeAssetTxPayment extension when paying transaction tips with the native chain token, based on a new proto field. These changes improve code clarity and flexibility for fee payments.

Fee asset handling improvements

  • Introduced the FeeAssetId enum to represent either a native token or a specific asset for transaction fees, replacing the previous usage of a raw u32 type. This change affects both the context struct and related functions.
  • Updated the fee_asset_id_from_tw function to return a FeeAssetId instead of a u32, and added logic to support charging native fees as assets when the new proto field is set.

Transaction payment extension logic

  • Modified the logic in PolkadotEntry to use ChargeAssetTxPayment with the correct asset ID type, utilizing the new as_u32() method of FeeAssetId.

Protocol buffer changes

  • Added the charge_native_as_asset_tx_payment boolean field to the SigningInput proto message to control whether native token tips are paid using the asset extension.

@github-actions
Copy link

github-actions bot commented Oct 27, 2025

Binary size comparison

➡️ aarch64-apple-ios: 14.18 MB

➡️ aarch64-apple-ios-sim: 14.18 MB

➡️ aarch64-linux-android:

- 18.67 MB
+ 18.67 MB 	 +1 KB

➡️ armv7-linux-androideabi: 15.61 MB

➡️ wasm32-unknown-emscripten: 13.31 MB

@satoshiotomakan satoshiotomakan merged commit 4adde2a into master Oct 27, 2025
15 checks passed
@satoshiotomakan satoshiotomakan deleted the feat/kusama-asset-hub branch October 27, 2025 17:22
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