Asset configuration
Last updated
Last updated
Starting from v0.21 most of the configuration can be done with WLM (described below), existing configuration of the existing assets in Assets.json still will be used in couple of versions more. But all new assets must be configured with the help of WLM
Asset configuration starts in WLM. Some of the general asset properties are used in WLA. You can read more about asset creation in WLM.
Asset name is used in WLA if WLA specific name is not defined (check Step 2)
Description of the asset is going to be checked by WLA and in case it contains url (string starting from "http..."), it will be used as information link for info icon of the asset We recommend to include it if you have website for your asset
Unit of measure or Currency (Currency must be filled in case asset type is Cash or Cash equivalent) of the asset are used as asset units in WLA
When asset is created by the admin, additional properties necessary for WLA, can be added using collection "WLA&WLP configuration". You can click "Add all" in the line of this collection, all available definition items will be added, you should only fill values for WLA relevant properties.
Make available in - add "WLA" as a value here to make sure that this asset is used in WLA
WLA and WLP_Asset ticker - Asset ticker used both in WLA and WLP must be defined
WLA_Name (optional) - WLA specific asset name can be defined in case you want asset to be used in WLA with some alternative naming
If you want asset to be displayed in “My Asset” screen, even when the wallet has no Sparks of it, then the parameter WLA_Show if balance is 0 must be set to true
WLA and WLP_Round to (optional) - For each asset to be shown in WLA, you can define the number of decimal places to which asset units will be rounded in WLA screens in case precise number is too long. This parameter is optional, in case you don't define it, WLA will round the amounts to 2 decimal places in case of Asset type is Cash or Cash Equivalent and to 4 decimal places for all other Asset types
Don't forget to remove optional properties values which you don't want to define ("Round to" and "Name")
You can add translations for the name, description and ticker to German and Spanish languages in case you expect WLA users in these languages
Finally, you will have Asset defined in WLM which is going to be used in WLA
You must use Assets.json configuration file to define the icon of the asset. Asset icon is mandatory.
Icon preparation:
Asset icon should be the square picture of file type PNG; recommended size: 400*400 px
Put the icon to the blob storage associated with your tenant to the folder "trading-app-configs/icons"
Copy the path to the file
Open Assets.v2.json configuration and list all the asset unique ids which are going to be used in WLA and their icons. Unique asset id can be found and copied from Asset details in WLM.
Please, note that [languageCode]Assets.v2.json file must be used to list the assets and their properties starting from v0.21. All previous version used [languageCode]Assets.v1.json file
If you want to define default order of the assets to be displayed in the list of assets you can use the parameter below.
In the example below assets are order by the amount of units of measure on the balance in the descending order.
sort_direction can have values "desc" (descending) and "asc" (ascending)
sort_by can have any asset object property as a value (for example, uomValue, name, description)