Add eht dummy account

This commit is contained in:
Manfred Karrer 2016-04-17 20:49:38 +02:00
parent b889e9dc14
commit b6f368c1ec
3 changed files with 12 additions and 5 deletions

View File

@ -76,7 +76,7 @@ import static io.bitsquare.app.BitsquareEnvironment.APP_NAME_KEY;
public class BitsquareApp extends Application {
private static final Logger log = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(BitsquareApp.class);
public static final boolean DEV_MODE = true;
public static final boolean DEV_MODE = false;
public static final boolean IS_RELEASE_VERSION = !DEV_MODE && true;
private static Environment env;

View File

@ -56,6 +56,7 @@ import io.bitsquare.p2p.network.CloseConnectionReason;
import io.bitsquare.p2p.network.Connection;
import io.bitsquare.p2p.network.ConnectionListener;
import io.bitsquare.p2p.peers.keepalive.messages.Ping;
import io.bitsquare.payment.CryptoCurrencyAccount;
import io.bitsquare.payment.OKPayAccount;
import io.bitsquare.trade.Trade;
import io.bitsquare.trade.TradeManager;
@ -500,7 +501,7 @@ public class MainViewModel implements ViewModel {
if (BitsquareApp.DEV_MODE) {
preferences.setShowOwnOffersInOfferBook(true);
if (user.getPaymentAccounts().isEmpty())
setupDevDummyPaymentAccount();
setupDevDummyPaymentAccounts();
}
setupMarketPriceFeed();
swapPendingOfferFundingEntries();
@ -899,11 +900,17 @@ public class MainViewModel implements ViewModel {
showPendingTradesNotification.set(numPendingTrades > 0);
}
private void setupDevDummyPaymentAccount() {
private void setupDevDummyPaymentAccounts() {
OKPayAccount okPayAccount = new OKPayAccount();
okPayAccount.setAccountNr("dummy");
okPayAccount.setAccountNr("dummy_" + new Random().nextInt(100));
okPayAccount.setAccountName("OKPay dummy");
okPayAccount.setSelectedTradeCurrency(CurrencyUtil.getDefaultTradeCurrency());
user.addPaymentAccount(okPayAccount);
CryptoCurrencyAccount cryptoCurrencyAccount = new CryptoCurrencyAccount();
cryptoCurrencyAccount.setAccountName("ETH dummy");
cryptoCurrencyAccount.setAddress("0x" + new Random().nextInt(1000000));
cryptoCurrencyAccount.setSingleTradeCurrency(CurrencyUtil.getCryptoCurrency("ETH").get());
user.addPaymentAccount(cryptoCurrencyAccount);
}
}

View File

@ -152,7 +152,7 @@ FED_WIRE=Fed Wire
SWISH= Swish
TRANSFER_WISE=TransferWise
US_POSTAL_MONEY_ORDER=US Postal money order
BLOCK_CHAINS=Crypto currencies
BLOCK_CHAINS=Cryptocurrencies
OK_PAY_SHORT=OKPay
PERFECT_MONEY_SHORT=Perfect Money