New function to asset pair by assets

This commit is contained in:
7u83 2018-12-31 14:05:02 +01:00
parent b5cf77abbd
commit 844a57df27
1 changed files with 5 additions and 0 deletions

View File

@ -271,6 +271,11 @@ public class GodWorld implements GetJson, World {
public AssetPair getDefaultAssetPair() {
return default_asset_pair;
}
public AssetPair getAssetPair(AbstractAsset asset, AbstractAsset currency){
String s = AssetPair.buildSymbol(asset.getSymbol(), currency.getSymbol());
return asset_pairs.getOrDefault(s, null);
}
/* public AbstractAsset createAsset(long key, JSONObject cfg) throws SeSimException{