public static AccountInfo adaptAccountInfo ( LakeBTCAccount lakeBTCAccount ) { // Adapt to XChange DTOs LakeBTCProfile profile = lakeBTCAccount . getProfile ( ) ; LakeBTCBalance balance = lakeBTCAccount . getBalance ( ) ; Balance usdBalance = new Balance ( Currency . USD , balance . getUSD ( ) ) ; Balance cnyWBalance = new Balance ( Currency . CNY , balance . getCNY ( ) ) ; Balance btcBalance = new Balance ( Currency . BTC , balance . getBTC ( ) ) ; return new AccountInfo ( profile . getId ( ) , new Wallet ( usdBalance , btcBalance , cnyWBalance ) ) ; }
Adapts a LakeBTCAccount to an AccountInfo