Join the discussion on Telegram
Why this matters
backend/src/services/sorobanService.ts line 52 does a dynamic await import('@stellar/stellar-sdk') to destructure TransactionBuilder, Account, Networks:
const { TransactionBuilder, Account, Networks } = await import('@stellar/stellar-sdk');
But all three names are already statically imported at the top of the file (line 1):
import { rpc, xdr, StrKey, Contract, nativeToScVal, Keypair, TransactionBuilder, Account, Networks } from '@stellar/stellar-sdk';
The dynamic import is dead and shadows the static names. Every call to simulateContractCall pays the cost of a redundant import resolution.
Acceptance criteria
Files to touch
backend/src/services/sorobanService.ts (line 52)
Out of scope
- Refactoring
pauseStream/resumeStream/withdraw which also dynamic-import Address (separate issue would be to do the same cleanup there if Address were already statically imported — it currently isn't)
Join the discussion on Telegram
Why this matters
backend/src/services/sorobanService.tsline 52 does a dynamicawait import('@stellar/stellar-sdk')to destructureTransactionBuilder,Account,Networks:But all three names are already statically imported at the top of the file (line 1):
The dynamic import is dead and shadows the static names. Every call to
simulateContractCallpays the cost of a redundant import resolution.Acceptance criteria
Files to touch
backend/src/services/sorobanService.ts(line 52)Out of scope
pauseStream/resumeStream/withdrawwhich also dynamic-importAddress(separate issue would be to do the same cleanup there ifAddresswere already statically imported — it currently isn't)