What problem does your feature solve?
The stellar ledger entry fetch trustline --asset flag accepts "XLM" (mapped to TrustLineAsset::Native), but trustlines do not hold the native asset — the native balance is held on the account entry itself. Passing --asset xlm silently returns an empty result instead of telling the user the input is invalid:
$ stellar ledger entry fetch trustline --asset xlm --account GB6RQWLXTCVLJZX6LACXVD4WFZHX4YGIPPBSH2YQQMZIMEKA4BM7QLOU
{"entries":[],"latestLedger":61271020}
|
let asset = if asset.eq_ignore_ascii_case("XLM") { |
|
TrustLineAsset::Native |
What would you like to see?
Return an error when "XLM" or "native" is passed as an --asset value, since trustlines cannot hold the native asset. For example:
error: native asset (XLM) does not have a trustline, use `stellar ledger entry fetch account` instead
What alternatives are there?
Leave the behavior as-is, silently returning an empty result.
What problem does your feature solve?
The
stellar ledger entry fetch trustline --assetflag accepts"XLM"(mapped toTrustLineAsset::Native), but trustlines do not hold the native asset — the native balance is held on the account entry itself. Passing--asset xlmsilently returns an empty result instead of telling the user the input is invalid:stellar-cli/cmd/soroban-cli/src/commands/ledger/entry/fetch/trustline.rs
Lines 60 to 61 in a1c9455
What would you like to see?
Return an error when
"XLM"or"native"is passed as an--assetvalue, since trustlines cannot hold the native asset. For example:What alternatives are there?
Leave the behavior as-is, silently returning an empty result.