encodeAsset method
Implementation
String encodeAsset(Asset asset) {
if (asset is AssetTypeNative) {
return Asset.TYPE_NATIVE;
} else if (asset is AssetTypeCreditAlphaNum) {
AssetTypeCreditAlphaNum creditAsset = asset;
return creditAsset.code + ":" + creditAsset.issuerId;
} else {
throw Exception("unsupported asset " + asset.type);
}
}