Skip to content

Commit b89e1f4

Browse files
nvrakesh06claude
andcommitted
refactor(abstract-substrate): replace any cast with typed intersection for coinSpecific.material
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 65b0b59 commit b89e1f4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

modules/abstract-substrate/src/abstractSubstrateCoin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
RecoveryTxRequest,
2121
SignedTransaction,
2222
TssVerifyAddressOptions,
23+
TransactionPrebuild,
2324
TxIntentMismatchRecipientError,
2425
UnexpectedAddressError,
2526
verifyEddsaTssWalletAddress,
@@ -151,7 +152,8 @@ export class SubstrateCoin extends BaseCoin {
151152
// transactions built against a chain spec version newer than the SDK's hardcoded metadata.
152153
// Without this, the factory falls back to its hardcoded material and misidentifies the call
153154
// pallet (e.g. reads a Balances transfer as treasury.disbursement after a chain upgrade).
154-
const prebuildMaterial = (txPrebuild as any).coinSpecific?.material as Material | undefined;
155+
const prebuildMaterial = (txPrebuild as TransactionPrebuild & { coinSpecific?: { material?: Material } })
156+
.coinSpecific?.material;
155157
if (prebuildMaterial && typeof factory.material === 'function') {
156158
factory.material(prebuildMaterial);
157159
}

0 commit comments

Comments
 (0)