1

Does anybody know best way to store an Asset descriptor once it has been created with Asset.createNonNativeAsset(currencyName, issuingKeys);? How do we store it and retrieve the reference when we need for instance to transfer from that asset and create trustlines?

I tried with

Asset asset = new AssetTypeCreditAlphaNum4("WOW", issuingKeys);

But hashcode etc are different.

2

What SDK are you using? Java, C#?

First of all, you are creating them differently. In the first case with a static method, in the second – with class constructor. I bet that the static method returns AssetTypeCreditAlphaNum4 casted to an abstract parent class, something like AssetTypeCreditAlphaNum.

In general, asset descriptor should be identical and work without any problems in both cases, of course if the asset code and issuer are the same in both calls. So try to check this in the first place. And do not forget about the case. "WOW" and "WoW" will return different hashcodes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.