Gas fee underestimation causes all limit order and bid placements to fail across Trade and Limits tabs #127
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue Summary
Attempting to place a limit order or bid on any token pair fails with an insufficient fee error. The frontend estimates
3000ulunain gas fees but LocalTerra requires a minimum of5665000uluna. This affects the Place Limit and Place Bid actions on both the/tradeand/limitspages, across all token pairs tested.Reproduction Steps
/tradeor/limitsExpected Behavior
The frontend should estimate gas fees accurately so that limit order and bid transactions submit successfully without manual fee adjustment.
Actual Behavior
The transaction fails with the following error logged in the browser console (
transactions.ts:160):The error originates at
transactions.ts:149insideexecuteTerraContract, called fromTradeOrderTicket.tsx:88.Environment Details
localterra(local Docker)VITE_NETWORK=local npm run devmake indexer-dev)make deploy-localWallet / Device Details
http://localhost:1317, RPChttp://localhost:26657Console Logs
Severity / Impact
Place Limit and Place Bid are non-functional across all token pairs on both the
/tradeand/limitstabs. No limit order or bid can be submitted in the current state. Likely related to open issue #115 (LAUNCH-BLOCKER: Swap transactions fail with 'out of gas' — gas estimate too low for wasm contract execution), the same gas underestimation logic intransactions.tsappears to affect limit order placement as well as swaps.@PlasticDigits Blocks dex launch
mentioned in commit
7dd49c4f00Fix landed on
main(7dd49c4)Root cause: Place Limit / Place Bid runs
increase_allowancefirst (BASE_GAS_LIMIT200k), then CW20sendwithplace_limit_order. IfVITE_GAS_PRICE_ULUNAis far below the network / Station minimum (~28.325 uluna per gas unit),Fee.amountwas computed as tiny (e.g. ~3000 uluna) whilegas_wantedstayed 200k — the node rejects with insufficient fees (~5.665M uluna required for that gas at 28.325).What changed
effectiveGasPriceUluna()floors env gas price atMIN_GAS_PRICE_ULUNA(28.325);estimateTerraClassicFee, Station walletgasPrice, and devMnemonicWalletuse it.getGasLimitForTxbranch for top-levelplace_limit_order.scripts/deploy-dex-local.shnow setsVITE_GAS_PRICE_ULUNA=28.325infrontend-dapp/.env.local.docs/frontend.md,docs/limit-orders.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_LOCALNET_TRADING_SWARM.md(cross-linked, #127).Verification checklist for @brouie
VITE_NETWORK=local npm run dev(fresh.env.localfrom deploy script if possible).insufficient fees.VITE_GAS_PRICE_ULUNA=0.015in.env.local, rebuild dev server — txs should still use ≥28.325 for fee math (no ~3000 uluna fee on the first tx).cd frontend-dapp && npm ci && npm test -- --run— should pass (includes new floor +place_limit_ordergas tests).Issue left open until you confirm in your environment.
@PlasticDigits — source-side verification PASS on
7dd49c4. localnet UX walk (items 1-4 of your checklist) pending — totdking's environment is the natural blocker for that since the original repro was on his macOS Station setup. happy to walk on QA-server LocalTerra if useful, just need a heads-up.walked your checklist item 5:
npm test -- --run: 276/276 PASS across 35 test files. clean, no skipped, no env failures (the vite.config stderr is fromviteConfig.build.testasserting#118rejection path — intentional negative test).source review of the floor:
MIN_GAS_PRICE_ULUNA = 28.325defined atconstants.ts:32matches Station / network minimum from your repro.effectiveGasPriceUluna()(constants.ts:43-46): parsesVITE_GAS_PRICE_ULUNA, falls back toMIN_GAS_PRICE_ULUNAon invalid/zero/negative, thenMath.max(base, MIN_GAS_PRICE_ULUNA)enforces floor unconditionally — env override below floor is silently raised, env override above floor is honored.transactions.ts:24—feeAmount = Math.ceil(effectiveGasPriceUluna() * gasLimit)wallet.ts:79— StationgasPrice.amountdevWallet.ts:28— dev MnemonicWalletgasPrice.amountVITE_GAS_PRICE_ULUNAenv.new test coverage:
constants.test.tsdescribeeffectiveGasPriceUluna (GitLab #127)— 2 tests (floor when unset, above-floor override honored).transactions.test.ts:245-260— 2 tests forPLACE_LIMIT_ORDER_GAS_LIMITbranch covering both top-levelplace_limit_orderand CW20sendwith innerplace_limit_order.defensive
getGasLimitForTxbranch at top-levelplace_limit_ordercovers the contract-direct path too (not just CW20-wrapped viasend).deploy script update:
scripts/deploy-dex-local.shwritesVITE_GAS_PRICE_ULUNA=28.325to.env.localso fresh QA setups get the right env without manual override.cc @totdking — fix should resolve your insufficient-fee error end-to-end. dev wired the floor through Station + dev wallet + fee estimator paths, so even if your existing
.env.localstill hasVITE_GAS_PRICE_ULUNA=0.015from the older setup, the fee math will now ceil to ≥28.325 uluna per gas unit on tx broadcast.ready for close once a fresh environment confirms the original repro is gone.
@totdking Please verify the issue is resolved by reproducing the steps that previously caused the problem, then report your findings below.
On the dev-wallet (simulated wallet) , the transaction went through successfully,
But on the station wallet with the localTerra enabled, it still returned the same error as given
Final verdict
Station wallet overrides fee on LocalTerra despite preferNoSetFee: true set in KeplrExtension constructor (wallet.ts).
The app correctly computes 5,665,000uluna via effectiveGasPriceUluna(), but Station broadcasts 3000uluna (its own 0.015 × 200k calculation).
Dev wallet (MnemonicWallet) works correctly.
Root cause is likely that Station doesn't honor
defaultOptions.sign.preferNoSetFeethe same way Keplr does, or has a stale gas price stored internally for LocalTerra.Note:
This was after a hard refresh was taken on my browser, station wallet was reinstalled, the
frontend-dapp/node_modules/.vitewas deleted and thenpm run devwas re-runThe fix is good ,but the station wallet on local terra ignores the fix and uses it's stale pricing, Station in real life production (mainnet & testnet) would most likely not act like this as the chains will be properly registered with the station wallet with the correct gas price .
cc: @PlasticDigits
mentioned in commit
9a61c1c60cUpdate (Station + LocalTerra)
Cause: Station’s extension can ignore
preferNoSetFeeand rebuildFee.amountfrom a stale built-in LocalTerragasPriceStep(~0.015 uluna/gas), while the dApp already computed correctgas_wanted— hence 3000 uluna paid vs ~5.6M uluna required.Fix (merged on
main,9a61c1c): WhenVITE_NETWORK=local, Station extension connect callswindow.station.keplr.experimentalSuggestChain(...)with the same metadata as Keplr (gasPriceStep28.325 / 28.325 / 50 ). Failures are logged as a warning so connect still works if the user dismisses the prompt.Docs:
docs/frontend.md(gas invariant row),docs/limit-orders.md,docs/indexer-invariants.md(pointer),skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_LOCALNET_TRADING_SWARM.md.Verification checklist — @totdking
main,cd frontend-dapp && npm ci && npm run devwithVITE_NETWORK=localand LocalTerra LCD/RPC in.env.local.insufficient fees; got: \"3000uluna\".cd frontend-dapp && npm test -- --run(includeskeplrLikeExtensiontests).Leaving this issue open until you confirm Station + LocalTerra in your environment. Thanks!
mentioned in commit
b779f9a3f1QA note: Please verify LocalTerra limit/bid (and allowance-first txs) with both Station and Terra Classic Keplr — extension fee handling can differ even when in-app fee math matches.
Docs updated on
main(b779f9a):docs/frontend.md,docs/limit-orders.md,docs/indexer-invariants.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_LOCALNET_TRADING_SWARM.md.cc @totdking
mentioned in commit
98b3744667Update (GitLab #127 — Station still broadcasting ~3000 uluna on LocalTerra)
Merged on `main`: `
98b3744`What changed
`@goblinhunt/cosmes` patch (`frontend-dapp/patches/@goblinhunt+cosmes+0.0.71-ghunt.21.patch`): `KeplrExtension` now passes explicit `preferNoSetFee` / `preferNoSetMemo` on every `signAmino` and `signDirect` call (not only via `defaultOptions` in the constructor). This targets Station builds that still overwrite `Fee.amount` from a stale LocalTerra gas step when the dApp already supplied the correct fee.
`wallet.ts`: For `VITE_NETWORK=local` + Station extension, `experimentalSuggestChain` runs again after a successful `connect` (in addition to the existing pre-connect call), so chain metadata is refreshed after `enable()`.
Docs / agent playbooks: `docs/frontend.md`, `docs/limit-orders.md`, `docs/indexer-invariants.md`, `skills/AGENTS_TERRACLASSIC_GAS.md`, `skills/AGENTS_LOCALNET_TRADING_SWARM.md` — invariants and cross-links updated to describe the patch + dual suggest.
CI / local verification (already run)
Checklist for @totdking (please confirm)
98b3744` or newer), `cd frontend-dapp && npm ci && npm run dev` with `VITE_NETWORK=local` and LocalTerra LCD/RPC in `.env.local`.Request: @totdking — please run the checklist above on your macOS + Station + LocalTerra setup (original repro) and reply here with pass/fail. Leaving the issue open until you confirm.
cc @PlasticDigits
Status
Fail
logs:
This is the result of the Station wallet still , same issue , but works well in local dev.
tries to take trade with
fails with the log error above in the logs header
This was done after completing every step mentioned in the suggested fix testing.
cc @PlasticDigits
mentioned in issue #133
@totdking — quick sanity check on the cosmes patch state on your end. one thing worth confirming before chasing further down the Station-shim path.
the patch at
frontend-dapp/patches/@goblinhunt+cosmes+0.0.71-ghunt.21.patchadds anEXTENSION_SIGN_OPTIONSconstant and passes it explicitly to bothsignAminoandsignDirect(per-call, not just constructordefaultOptions). patch-package only re-runs that onnpm install/npm cipostinstall, so if you pulled98b3744and did not reinstall, the running file innode_modulesis still the upstream version with only the constructor-level option set.could you grep your installed copy:
if you see only one hit (line ~11, the constructor
defaultOptions) → patch is not applied, annpm cishould pick it up.if you see multiple hits including
EXTENSION_SIGN_OPTIONS→ patch is applied and the failing path is something else, in which case @PlasticDigits the next theory is Station window.station.keplr shim ignoringpreferNoSetFeeregardless of how it is passed, and the fix needs to go through Station native API rather than the keplr-compat layer.flagging this because the same grep on a fresh checkout here also shows only the line-11 hit, which means at least one local install state has the patch missing. wanted to rule it out cleanly before dev chases shim-side theories.
When the comand
cd frontend-dapp && grep -n "EXTENSION_SIGN_OPTIONS\|preferNoSetFee" node_modules/@goblinhunt/cosmes/dist/wallet/wallets/keplr/KeplrExtension.jsis ran, this is the output i receivedIt hit multiple lines and not just the L11 the constructor
defaultOptionscc @Brouie
mentioned in commit
74645812d6mentioned in commit
1aadd45c9aUpdate (merged to
main—1aadd45)Problem: Station + LocalTerra still broadcast ~3000 uluna on
increase_allowance/ limit flows even with per-signDirectpreferNoSetFeeon the Keplr-shaped API (see thread — patch applied, grep showedEXTENSION_SIGN_OPTIONS, repro still fail).Change: Extended
frontend-dapp/patches/@goblinhunt+cosmes+0.0.71-ghunt.21.patchsoStationController.connectExtensionpassesuseAmino: trueintoStationExtensionwhenchainId === "localterra"and the key is not Ledger (!isNanoLedger).StationExtensionis an alias ofKeplrExtension, so this usessignAminoinstead ofsignDirecton LocalTerra only — avoiding the shim path that was recomputing fees from a stale gas step.Docs / agent playbooks:
docs/frontend.md,docs/limit-orders.md,docs/indexer-invariants.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_LOCALNET_TRADING_SWARM.md;keplrLikeExtension.tscomment crosslinks the gas skill.CI / local:
cd frontend-dapp && npm ci && npm test -- --run→ 288/288 PASS;npm run build→ PASS.Verification checklist — @totdking
main(1aadd45or newer),cd frontend-dapp && npm ci && npm run devwithVITE_NETWORK=localand LocalTerra LCD/RPC in.env.local.increase_allowance): confirm broadcast does not fail withinsufficient fees; got: "3000uluna".npm test -- --runinfrontend-dapp.Please confirm pass/fail on your macOS + Station + LocalTerra setup.
Requesting verification: @totdking
Issue left open until you confirm.
cc @PlasticDigits
mentioned in issue #115
Verification checklist
main(1aadd45or newer),cd frontend-dapp && npm ci && npm run devwithVITE_NETWORK=localand LocalTerra LCD/RPC in.env.local.increase_allowance): confirm broadcast does not fail withinsufficient fees; got: "3000uluna".npm test -- --runinfrontend-dapp.Checklist no. 3 still returns the same error :
Transaction failed: insufficient fees; got: "3000uluna", required: "190000uaud,190000ucad,140000uchf,980000ucny,900000udkk,125000ueur,110000ugbp,1170000uhkd,2180000000uidr,10880000uinr,16370000ujpy,170000000ukrw,5665000uluna,428571000umnt,600000umyr,1250000unok,7600000uphp,104938usdr,1250000usek,200000usgd,4620000uthb,4000000utwd,150000uusd"(gas) [+ ""(tax)]: insufficient feeVisual checklist for limit order transactions
Observed: returns the
insufficient fees 3000ulunaerror on Station walletEnvironment
localterra(local Docker)VITE_NETWORK=local npm run devReady to close on dev side: NO
cc: @PlasticDigits
mentioned in commit
0300fcb5faUpdate (merged to
main—0300fcb)Context: GitLab #127 — Station + LocalTerra still risked
insufficient fees; got: "3000uluna"when the Keplr-shaped path usedsignDirectand the extension overwroteFee.amount. The stack already uses amino signing for LocalTerra (and always for Ledger) via patchedStationController.This change
frontend-dapp/patches/@goblinhunt+cosmes+0.0.71-ghunt.21.patch: inStationController.connectExtension(dist JS),isLocalTerraChainis nowtypeof chainId === "string" && chainId.toLowerCase() === "localterra", thenuseAminoSigning = isNanoLedger || isLocalTerraChain. Strict equality on"localterra"alone could miss alternate casing fromgetKey/ wallet registry.@@counts fixed (+84,11) so patch-package parses and applies reliably.docs/frontend.md(Terra Classic gas table),docs/limit-orders.md,docs/indexer-invariants.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_LOCALNET_TRADING_SWARM.md.CI / local
cd frontend-dapp && npm ci && npm test -- --run→ 302/302 PASSnpm run build→ PASSChecklist for verification (please run on your setup; @totdking — request for sign-off)
git pullandcd frontend-dapp && npm ci(ensures patch-package re-applies the cosmes patch).VITE_NETWORK=local, LocalTerra LCD/RPC in.env.local,npm run dev./tradeor/limits: Place Bid / Place Limit (first tx is oftenincrease_allowance) — must not showinsufficient fees; got: "3000uluna".npm test -- --runinfrontend-dapp.Station + LocalTerra invariants (short)
Fee.amountuseseffectiveGasPriceUluna()(floor 28.325).KeplrExtension: per-signAmino/signDirectpreferNoSetFee.StationController: amino for LocalTerra (case-insensitivechainId) or Ledger;wallet.tsexperimentalSuggestChainpre+post connect forVITE_NETWORK=local.Issue left open per process until environment confirmation.
cc @totdking
mentioned in issue #134
mentioned in issue #147
Concerning this issue, there is a regression to this i encountered in a recent commit, but this only affects the
/swappageDetails
Any swap tx carried out fails with error
error: Error: Transaction failed: Transaction needed more gas than estimated. Try again — gas usage can vary slightly between blocks. at executeTerraContract (transactions.ts:207:13)The limit order and market orders all function as expected
Regression. : /Swap gas usage has increased from 753,321 → 832,914 after pair contract v1.5.0 (
5c8ec62). The frontend ceiling of 830,000 (SWAP_GAS_PER_HOP=600k × SWAP_GAS_BUFFER=1.3 + 50k padding) is now 2,914 gas short. All 1-hop pool swaps fail with "Transaction needed ▎ more gas than estimated. "Fix : Raise
EXECUTE_SWAP_OPS_MIN_GAS_PER_HOPin constants.ts from 661,000 to ≥ 900,000, or bump SWAP_GAS_PER_HOP above 603,000 to clear the 832,914 floor with the 1.3x buffer applied.Confirmed via: terrad tx wasm execute with --gas 1,200,000 → gas_used: 832,914.
cc: @PlasticDigits ~"blocker:v2"
mentioned in commit
98424ae9f4mentioned in commit
c6b2b460faUpdate (merged to
main—c6b2b46)This builds on the prior #127 mitigations (
effectiveGasPriceUluna()floor, StationexperimentalSuggestChainpre/post connect, cosmespreferNoSetFeeon every sign, LocalTerra/Ledger → amino in patchedStationController).What changed in this merge
Post-sign fee guard (cosmes patch) — After
signAmino, patchedKeplrExtensioncallsassertExtensionSignedFeeMeetsExpectedon LocalTerra (chainIdcase-insensitive). If Station returns a fee far below the dAppFee(repro: ~3000 uluna vs ~5.6M uluna), the dApp throws before broadcast with actionable copy instead of only the nodeinsufficient feeserror.Unit tests —
extensionSignedFeeGuard.test.ts(guard logic) andcosmesPatch127.test.ts(CI check thatnpm ciapplied the patch:EXTENSION_SIGN_OPTIONS,assertExtensionSignedFeeMeetsExpected,isLocalTerraChain).Docs / agent playbooks —
docs/frontend.md,docs/limit-orders.md,docs/indexer-invariants.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_LOCALNET_TRADING_SWARM.mdcross-linked.CI / local verification (run on this merge)
cd frontend-dapp && npm ci && npm test -- --run→ 478/478 PASSnpm run build→ PASSVerification checklist — @totdking
main(c6b2b46or newer).cd frontend-dapp && npm ci && npm run devwithVITE_NETWORK=localand LocalTerra LCD/RPC in.env.local.grep assertExtensionSignedFeeMeetsExpected node_modules/@goblinhunt/cosmes/dist/wallet/wallets/keplr/KeplrExtension.js(should match).increase_allowance):insufficient fees; got: "3000uluna".npm test -- --runlocally.Requesting verification: @totdking — please run the checklist on your macOS + Station + LocalTerra setup and reply pass/fail.
Issue left open until you confirm.
cc @PlasticDigits
mentioned in commit
e6d8311a9dUpdate (merged to
main—e6d8311)Context: Station + LocalTerra could still reach node broadcast with
insufficient fees; got: "3000uluna"when the wallet returned a missing/zero/undershoot signed fee that slipped past the earlier guard (signedUluna > 0check only).What changed
extensionSignedFeeGuard.ts+ cosmes patch — Post-sign validation on LocalTerra now flags missing, zero, and undershoot uluna on bothsignAminoandsignDirect(fail-fast before broadcast). Shared error prefix:EXTENSION_SIGNED_FEE_UNDERSHOOT_PREFIX.humanizeTerraTxError.ts— Surfaces the3000ulunarepro with actionable copy (disconnect/reconnect Station, approve chain update,npm ci).docs/frontend.md,docs/limit-orders.md,docs/indexer-invariants.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_LOCALNET_TRADING_SWARM.mdupdated and cross-linked.CI / local verification
cd frontend-dapp && npm ci && npm test -- --run→ 500/500 PASS (includes strengthened guard + humanizer tests)cosmesPatch127.test.tsasserts patch contains direct-path guard symbolsVerification checklist — @totdking
main(e6d8311or newer)cd frontend-dapp && npm ci && npm run devwithVITE_NETWORK=localand LocalTerra LCD/RPC in.env.localincrease_allowance): confirm broadcast does not fail withinsufficient fees; got: "3000uluna"cd frontend-dapp && npm test -- --runRequesting verification: @totdking — please run the checklist on your macOS + Station + LocalTerra setup and reply pass/fail.
Issue left open until confirmed.
cc @PlasticDigits
main(e6d8311or newer)cd frontend-dapp && npm ci && npm run devwithVITE_NETWORK=localand LocalTerra LCD/RPC in.env.localincrease_allowance): confirm broadcast does not fail withinsufficient fees; got: "3000uluna"cd frontend-dapp && npm test -- --runStation wallet issues
The
/trade&/limitorders still fail with this error message (from the console) `Terra Classic transaction error: Error: Wallet signed a fee far below what this dApp submitted (GitLab #127). On LocalTerra with Station: disconnect, reconnect, and approve any chain-update prompt. Run cd frontend-dapp && npm ci so the cosmes patch is applied, then retry. Expected at least ~5665000 uluna; wallet returned ~3000 uluna. at async executeTerraContract (transactions.ts:201:20)at async Object.mutationFn (LimitOrdersPage.tsx:293:7)`
The
/swapstill with station returns this error message:Wallet signed a fee far below what this dApp submitted (GitLab #127). On LocalTerra with Station: disconnect, reconnect, and approve any chain-update prompt. Run cd frontend-dapp && npm ci so the cosmes patch is applied, then retry. Expected at least ~23509750 uluna; wallet returned ~12450 ulunaKeplr issues
/swapon the dex gives this error (console):Transaction needed more gas than estimated. Try again — gas usage can vary slightly between blocks. at executeTerraContract (transactions.ts:207:13)cc: @PlasticDigits
mentioned in commit
a5435b6283Update (merged to
main—a5435b6)Problem
Station + LocalTerra could still broadcast ~3000 uluna on
increase_allowance/ limit flows despite prior fee-floor and cosmes patch work. Retail paths also duplicated allowance + action logic across/trade,/limits, and market swap.What changed
Universal transaction stack (GitLab #127 refactor)
terraGas.ts— single source forgetGasLimitForTx/buildTerraClassicFeeterraBroadcast.ts—broadcastTerraExecuteContractsis the only sign/broadcast/poll pathtransactions.ts— thinexecuteTerraContract*wrappers +executeCw20AllowanceThenpair.ts—placeLimitOrderWithAllowancefor retail limit/bidincrease_allowance+ duplicate broadcast code)Station / LocalTerra
wallet.ts: setsstation.keplr.defaultOptions.sign.preferNoSetFeebefore connect on localDocs / agent playbooks:
docs/frontend.md,docs/limit-orders.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_LOCALNET_TRADING_SWARM.mdCI / local:
cd frontend-dapp && npm ci && npm test -- --run→ 515/515 PASS;npm run build→ PASSVerification checklist — @totdking
main(a5435b6or newer),cd frontend-dapp && npm ci && npm run devwithVITE_NETWORK=localand LocalTerra LCD/RPC in.env.localincrease_allowance): confirm broadcast does not fail withinsufficient fees; got: "3000uluna"npm test -- --runinfrontend-dappinsufficient feesIssue left open until LocalTerra + Station verification passes in your environment.
Verification checklist
main(a5435b6or newer),cd frontend-dapp && npm ci && npm run devwithVITE_NETWORK=localand LocalTerra LCD/RPC in.env.localincrease_allowance): confirm broadcast does not fail withinsufficient fees; got: "3000uluna"npm test -- --runinfrontend-dappinsufficient feesIssues noticed
When ever any sort of tx is to be carried out with
station wallet, i encounter aTransaction rejected by usererror even after clicking on getting the tx processedfull tx error :
installHook.js:1 Terra Classic transaction error: WalletError: User denied, extension popup was closed.cc: @PlasticDigits
mentioned in issue #179
mentioned in issue #138
mentioned in issue #206
mentioned in commit
25b4793913mentioned in issue #213
mentioned in commit
16caeb46fbUpdate (merged to
main—16caeb4)Problem: Station + LocalTerra still broadcast ~3000 uluna on
increase_allowance/ limit flows after prior mitigations. Two remaining gaps:ensureStationLocalNetworkRegisteredreturned early whenhasNetworkwas true, so Station kept a stale ~0.015 uluna/gas registration from an earlier LocalTerra setup.Feeobject instead of the aminostdDoc.feeactually sent tosignAmino, so the uluna check could be skipped and the undershoot reached the node asinsufficient fees; got: "3000uluna".Changes:
stationNativeNetwork.ts: always calladdNetwork(refreshgasPriceseven when the network already exists); post-connect refresh inwallet.ts.@goblinhunt+cosmes patch: post-sign guard now comparessigned.feetostdDoc.fee(amino-to-amino).terraBroadcast.ts: surface fee-guard / humanized fee errors before generic Transaction rejected by user copy (#208 false reject UX).docs/frontend.md,docs/indexer-invariants.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_FRONTEND_STATION_SIGNING.md,skills/AGENTS_LOCALNET_TRADING_SWARM.md.CI / local verification (already run):
cd frontend-dapp && npm ci && npm run test:run→ 711/711 PASSVerification checklist — @totdking
main(16caeb4or newer),cd frontend-dapp && npm ci && npm run devwithVITE_NETWORK=localand LocalTerra LCD/RPC in.env.local.increase_allowance): confirm broadcast does not fail withinsufficient fees; got: "3000uluna".cd frontend-dapp && npm run test:run(includescosmesPatch127.test.ts,stationNativeNetwork.test.ts).Please confirm pass/fail on your macOS + Station + LocalTerra setup.
Requesting verification: @totdking
Issue left open until you confirm.
cc @PlasticDigits
mentioned in issue #235
marked as related to #235
@totdking
Root cause (LocalTerra + Terra Station)
We traced the persistent insufficient fees / Wallet signed a fee far below what this dApp submitted errors to a wallet limitation on LocalTerra, not a dApp fee-calculation bug:
localterra-cl8ybinary)localterranetwork entrypreferNoSetFee,experimentalSuggestChain, andaddNetworkoverrides for this built-in chain)effectiveGasPriceUluna, fee estimate)Station therefore signs fees far below what the chain accepts (e.g. ~12 600 uluna vs ~23 793 000 uluna on a swap). The cosmes post-sign fee guard correctly blocks the broadcast instead of letting it fail on-chain with
insufficient fees; got: "3000uluna".Keplr on LocalTerra works — it honors the dApp-supplied fee. Dev/simulated wallet also works.
Station behaves correctly on columbus-5 (built-in network with 28.325 step), which matches how other Terra Classic dApps (e.g. ustr-cmm) operate in production.
Decision
Do not use Terra Station for LocalTerra QA. Station verification should happen only after columbus-5 deployment with non-economic tokens.
Opened #235 to update docs, specs, QA templates, and agent skills so this is explicit everywhere we currently say “test Station + Keplr on LocalTerra”.
Request
Please verify #127 on non–Terra Station wallets on LocalTerra:
increase_allowancepath)insufficient fees/ false “Transaction rejected by user”Station-on-LocalTerra remains a known out-of-scope limitation until columbus-5 staging.
Doc follow-up: GitLab #235 merged to
main(5b8267e) — Station P0 verification is columbus-5 only; LocalTerra wallet QA uses Keplr/dev wallet. Seedocs/frontend.md§ Station extension signing andskills/AGENTS_FRONTEND_STATION_SIGNING.md.mentioned in commit
d68950d290mentioned in issue #259
Re-verified #127 on current main. The fee-underestimation bug is resolved on the in-scope wallets; Station-on-LocalTerra stays the known out-of-scope path per the #235 decision.
Dev / simulated wallet — live, on-chain:
Keplr:
Station:
Source / unit on current main:
Good to close from my side. @PlasticDigits
mentioned in issue #305
mentioned in merge request !778
mentioned in issue #330
mentioned in issue #337
mentioned in issue #367
mentioned in issue #371
mentioned in merge request !897
mentioned in issue #414
mentioned in issue #429
mentioned in merge request !957
mentioned in issue #460
mentioned in issue #475
mentioned in issue #567
mentioned in issue #587
mentioned in issue #679
marked as related to #679
mentioned in issue #681
marked as related to #681