use of bisq.core.payment.PerfectMoneyAccount in project bisq-desktop by bisq-network.
the class MainViewModel method setupDevDummyPaymentAccounts.
private void setupDevDummyPaymentAccounts() {
if (user.getPaymentAccounts() != null && user.getPaymentAccounts().isEmpty()) {
PerfectMoneyAccount perfectMoneyAccount = new PerfectMoneyAccount();
perfectMoneyAccount.init();
perfectMoneyAccount.setAccountNr("dummy_" + new Random().nextInt(100));
// Don't translate only for dev
perfectMoneyAccount.setAccountName("PerfectMoney dummy");
perfectMoneyAccount.setSelectedTradeCurrency(GlobalSettings.getDefaultTradeCurrency());
user.addPaymentAccount(perfectMoneyAccount);
if (p2PService.isBootstrapped()) {
accountAgeWitnessService.publishMyAccountAgeWitness(perfectMoneyAccount.getPaymentAccountPayload());
} else {
p2PService.addP2PServiceListener(new BootstrapListener() {
@Override
public void onUpdatedDataReceived() {
accountAgeWitnessService.publishMyAccountAgeWitness(perfectMoneyAccount.getPaymentAccountPayload());
}
});
}
CryptoCurrencyAccount cryptoCurrencyAccount = new CryptoCurrencyAccount();
cryptoCurrencyAccount.init();
// Don't translate only for dev
cryptoCurrencyAccount.setAccountName("ETH dummy");
cryptoCurrencyAccount.setAddress("0x" + new Random().nextInt(1000000));
cryptoCurrencyAccount.setSingleTradeCurrency(CurrencyUtil.getCryptoCurrency("ETH").get());
user.addPaymentAccount(cryptoCurrencyAccount);
}
}
use of bisq.core.payment.PerfectMoneyAccount in project bisq-api by mrosseel.
the class PerfectMoneyPaymentAccountConverter method toBusinessModel.
@Override
public PerfectMoneyAccount toBusinessModel(PerfectMoneyPaymentAccount rest) {
final PerfectMoneyAccount business = new PerfectMoneyAccount();
business.init();
business.setAccountNr(rest.accountNr);
toBusinessModel(business, rest);
return business;
}
Aggregations