src/soroban.ts:460 — DEFAULT_RESOURCE_FEE_ESTIMATE = 1_000_000n (0.1 XLM), with the comment "a typical resource fee is a small fraction of one XLM".
The only caller is the insufficient-balance path of StreamsModule.create() (src/streams.ts:258-262), i.e. create_stream, which deploys a new contract (WASM instantiate + initialize + 3 persistent writes + 2 token transfers + a governor cross-contract call). Its resource fee is routinely several XLM, not a fraction of one.
Impact
InsufficientBalanceError.requiredBalance reported to the user is depositStroops + 1_000_000n — understated by the bulk of the real resource fee. The user tops up by the quoted amount and the next attempt still fails. This is the mirror-image of #430 (which over-stated by ~500 XLM).
Suggested fix
Pull the real fee from the error simulation when present; only fall back when it is truly absent, and size the fallback to the operation type (create ≫ withdraw).
src/soroban.ts:460—DEFAULT_RESOURCE_FEE_ESTIMATE = 1_000_000n(0.1 XLM), with the comment "a typical resource fee is a small fraction of one XLM".The only caller is the insufficient-balance path of
StreamsModule.create()(src/streams.ts:258-262), i.e.create_stream, which deploys a new contract (WASM instantiate +initialize+ 3 persistent writes + 2 token transfers + a governor cross-contract call). Its resource fee is routinely several XLM, not a fraction of one.Impact
InsufficientBalanceError.requiredBalancereported to the user isdepositStroops + 1_000_000n— understated by the bulk of the real resource fee. The user tops up by the quoted amount and the next attempt still fails. This is the mirror-image of #430 (which over-stated by ~500 XLM).Suggested fix
Pull the real fee from the error simulation when present; only fall back when it is truly absent, and size the fallback to the operation type (
create≫withdraw).