@@ -38,6 +38,7 @@ import {
3838} from './iface' ;
3939import { getAddress , getDelegateAddress } from './iface_utils' ;
4040import utils from './utils' ;
41+ import { toJsonFromWasm } from './wasmParser' ;
4142import BigNumber from 'bignumber.js' ;
4243import { Vec } from '@polkadot/types' ;
4344import { PalletConstantMetadataV14 } from '@polkadot/types/interfaces' ;
@@ -161,6 +162,20 @@ export class Transaction extends BaseTransaction {
161162 if ( ! this . _dotTransaction ) {
162163 throw new InvalidTransactionError ( 'Empty transaction' ) ;
163164 }
165+
166+ // WASM path for signed tdot transactions — validates WASM parsing against production.
167+ // Only for signed txs because toBroadcastFormat() returns the signed extrinsic (parseable).
168+ // Unsigned txs return a signing payload (different format), so they use the legacy path.
169+ if ( this . _coinConfig . name === 'tdot' && this . _signedTransaction ) {
170+ return toJsonFromWasm ( {
171+ txHex : this . _signedTransaction ,
172+ material : utils . getMaterial ( this . _coinConfig ) ,
173+ senderAddress : this . _sender ,
174+ coinConfigName : this . _coinConfig . name ,
175+ referenceBlock : this . _dotTransaction . blockHash ,
176+ blockNumber : Number ( this . _dotTransaction . blockNumber ) ,
177+ } ) ;
178+ }
164179 const decodedTx = decode ( this . _dotTransaction , {
165180 metadataRpc : this . _dotTransaction . metadataRpc ,
166181 registry : this . _registry ,
0 commit comments