Closed AliKarimiENT closed 1 year ago
This actually is in Asset class that there is nothing to get asset code
Well I don't know flutter so take everthing with a grain of salt but you won't find that field in the Asset
base class as ... not all assets have a code. XLM/native is also an asset, but none with an issuer or code.
So you'll need to test if the asset is an ALPANUMARIC asset and 🎉 you'll find the code and issuer properties.
https://github.com/Soneso/stellar_flutter_sdk/blob/61f48613baf5baf904999f548adcff1e72b35184/lib/src/asset_type_credit_alphanum.dart#L11-L12
Thanks, I defined these variables late stl.AssetTypeCreditAlphaNum sellingAsset,buyingAsset; And initialized with a cast to AssetTypeCreditAlphaNum sellingAsset = offer.selling as stl.AssetTypeCreditAlphaNum;
Hello I have faced an issue: I can not get Selling and Buying asset's code from offers of an account. For example, I have created an offer from native to BTC. When I load the offers, there is no property to get the asset's code. Please check this Thanks