use of com.samourai.stomp.client.IStompClientService in project samourai-wallet-android by Samourai-Wallet.
the class AndroidWhirlpoolWalletService method computeWhirlpoolWalletConfig.
protected WhirlpoolWalletConfig computeWhirlpoolWalletConfig(TorManager torManager, WhirlpoolWalletPersistHandler persistHandler, boolean testnet, boolean onion, int mixsTarget, String scode, IHttpClient httpClient, BackendApi backendApi) {
IStompClientService stompClientService = new AndroidStompClientService(torManager);
WhirlpoolServer whirlpoolServer = testnet ? WhirlpoolServer.TESTNET : WhirlpoolServer.MAINNET;
String serverUrl = whirlpoolServer.getServerUrl(onion);
NetworkParameters params = whirlpoolServer.getParams();
WhirlpoolWalletConfig whirlpoolWalletConfig = new WhirlpoolWalletConfig(httpClient, stompClientService, persistHandler, serverUrl, params, true, backendApi);
// disable auto-tx0
whirlpoolWalletConfig.setAutoTx0PoolId(null);
// enable auto-mix
whirlpoolWalletConfig.setAutoMix(true);
whirlpoolWalletConfig.setMixsTarget(mixsTarget);
whirlpoolWalletConfig.setScode(scode);
whirlpoolWalletConfig.setMaxClients(1);
whirlpoolWalletConfig.setSecretPointFactory(AndroidSecretPointFactory.getInstance());
whirlpoolWalletConfig.setTx0Service(new AndroidTx0Service(whirlpoolWalletConfig));
for (Map.Entry<String, String> configEntry : whirlpoolWalletConfig.getConfigInfo().entrySet()) {
Log.v(TAG, "whirlpoolWalletConfig[" + configEntry.getKey() + "] = " + configEntry.getValue());
}
return whirlpoolWalletConfig;
}
Aggregations