Rename Payment account to Trading account

This commit is contained in:
Manfred Karrer 2016-10-08 17:06:19 +02:00
parent 9e6b21cec0
commit 90b17eb856
12 changed files with 35 additions and 35 deletions

View file

@ -105,7 +105,7 @@ public abstract class BitsquareExecutable {
parser.accepts(CoreOptionKeys.APP_DATA_DIR_KEY, description("Application data directory", DEFAULT_APP_DATA_DIR))
.withRequiredArg();
parser.accepts(CoreOptionKeys.IGNORE_DEV_MSG_KEY, description("If set to true all signed messages from Bitsquare developers are ignored " +
"(Global alert, Version update alert, Filters for offers, nodes or payment account data)", false))
"(Global alert, Version update alert, Filters for offers, nodes or trading account data)", false))
.withRequiredArg()
.ofType(boolean.class);
parser.accepts(CoreOptionKeys.DUMP_STATISTICS, description("If set to true the trade statistics are stored as json file in the data dir.", false))

View file

@ -52,7 +52,7 @@ public class ProcessPayDepositRequest extends TradeTask {
PaymentAccountContractData paymentAccountContractData = checkNotNull(payDepositRequest.takerPaymentAccountContractData);
final PaymentAccountFilter[] appliedPaymentAccountFilter = new PaymentAccountFilter[1];
if (processModel.isPeersPaymentAccountDataAreBanned(paymentAccountContractData, appliedPaymentAccountFilter)) {
failed("Other trader is banned by his payment account data.\n" +
failed("Other trader is banned by his trading account data.\n" +
"paymentAccountContractData=" + paymentAccountContractData.getPaymentDetails() + "\n" +
"banFilter=" + appliedPaymentAccountFilter[0].toString());
return;

View file

@ -50,7 +50,7 @@ public class ProcessPublishDepositTxRequest extends TradeTask {
PaymentAccountContractData paymentAccountContractData = checkNotNull(publishDepositTxRequest.offererPaymentAccountContractData);
final PaymentAccountFilter[] appliedPaymentAccountFilter = new PaymentAccountFilter[1];
if (processModel.isPeersPaymentAccountDataAreBanned(paymentAccountContractData, appliedPaymentAccountFilter)) {
failed("Other trader is banned by his payment account data.\n" +
failed("Other trader is banned by his trading account data.\n" +
"paymentAccountContractData=" + paymentAccountContractData.getPaymentDetails() + "\n" +
"banFilter=" + appliedPaymentAccountFilter[0].toString());
return;

View file

@ -121,7 +121,7 @@ public class AccountView extends ActivatableView<TabPane, AccountViewModel> {
String key = "accountPrivacyInfo";
if (!DevFlags.DEV_MODE)
new Popup().backgroundInfo("In the account screen you can setup your payment accounts for national currencies " +
new Popup().backgroundInfo("In the account screen you can setup your trading accounts for national currencies " +
"as well as for altcoins.\n\n" +
"For Bitcoin you don't need to set up an account.\n" +
"You can manage your Bitsquare wallet at the \"Funds\" section.\n\n" +

View file

@ -242,7 +242,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
boolean result = model.initWithData(direction, tradeCurrency);
if (!result)
new Popup().warning("You don't have a payment account set up.").onClose(this::close).show();
new Popup().warning("You don't have a trading account set up.").onClose(this::close).show();
if (direction == Offer.Direction.BUY) {
imageView.setId("image-buy-large");
@ -480,7 +480,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
placeOfferButton.disableProperty().bind(model.isPlaceOfferButtonDisabled);
cancelButton2.disableProperty().bind(model.cancelButtonDisabled);
// payment account
// trading account
currencyComboBox.prefWidthProperty().bind(paymentAccountsComboBox.widthProperty());
currencyComboBox.managedProperty().bind(currencyComboBox.visibleProperty());
currencyComboBoxLabel.visibleProperty().bind(currencyComboBox.visibleProperty());
@ -528,7 +528,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
placeOfferButton.disableProperty().unbind();
cancelButton2.disableProperty().unbind();
// payment account
// trading account
currencyComboBox.managedProperty().unbind();
currencyComboBox.prefWidthProperty().unbind();
currencyComboBoxLabel.visibleProperty().unbind();
@ -726,11 +726,11 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
}
private void addPaymentGroup() {
TitledGroupBg titledGroupBg = addTitledGroupBg(gridPane, gridRow, 2, "Select payment account");
TitledGroupBg titledGroupBg = addTitledGroupBg(gridPane, gridRow, 2, "Select trading account");
GridPane.setColumnSpan(titledGroupBg, 3);
paymentAccountsComboBox = addLabelComboBox(gridPane, gridRow, "Payment account:", Layout.FIRST_ROW_DISTANCE).second;
paymentAccountsComboBox.setPromptText("Select payment account");
paymentAccountsComboBox = addLabelComboBox(gridPane, gridRow, "Trading account:", Layout.FIRST_ROW_DISTANCE).second;
paymentAccountsComboBox.setPromptText("Select trading account");
paymentAccountsComboBox.setMinWidth(300);
editOfferElements.add(paymentAccountsComboBox);

View file

@ -340,19 +340,19 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
private void onCreateOffer() {
if (!model.hasPaymentAccount()) {
openPopupForMissingAccountSetup("You have not setup a payment account",
openPopupForMissingAccountSetup("You have not setup a trading account",
"You need to setup a national currency or altcoin account before you can create an offer.\n" +
"Do you want to setup an account?", FiatAccountsView.class, "\"Account\"");
} else if (!model.hasPaymentAccountForCurrency()) {
new Popup().headLine("No payment account for selected currency")
.instruction("You don't have a payment account for the selected currency.\n" +
"Do you want to create an offer with one of your existing payment accounts?")
new Popup().headLine("No trading account for selected currency")
.instruction("You don't have a trading account for the selected currency.\n" +
"Do you want to create an offer with one of your existing trading accounts?")
.actionButtonText("Yes, create offer")
.onAction(() -> {
createOfferButton.setDisable(true);
offerActionHandler.onCreateOffer(model.getSelectedTradeCurrency());
})
.closeButtonText("Set up a new payment account")
.closeButtonText("Set up a new trading account")
.onClose(() -> {
navigation.setReturnPath(navigation.getCurrentPath());
navigation.navigateTo(MainView.class, AccountView.class, AccountSettingsView.class, FiatAccountsView.class);
@ -376,9 +376,9 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
"You need to setup at least one arbitrator to be able to trade.\n" +
"Do you want to do this now?", ArbitratorSelectionView.class, "\"Arbitrator selection\"");
} else if (!isPaymentAccountValidForOffer) {
openPopupForMissingAccountSetup("No matching payment account.",
"You don't have a payment account with the payment method required for that offer.\n" +
"You need to setup a payment account with that payment method if you want to take this offer.\n" +
openPopupForMissingAccountSetup("No matching trading account.",
"You don't have a trading account with the payment method required for that offer.\n" +
"You need to setup a trading account with that payment method if you want to take this offer.\n" +
"Do you want to do this now?", FiatAccountsView.class, "\"Account\"");
} else if (!hasSameProtocolVersion) {
new Popup().warning("That offer requires a different protocol version as the one used in your " +

View file

@ -620,12 +620,12 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
TitledGroupBg titledGroupBg = addTitledGroupBg(gridPane, gridRow, 2, "Payment info");
GridPane.setColumnSpan(titledGroupBg, 3);
Tuple2<Label, ComboBox> tuple = addLabelComboBox(gridPane, gridRow, "Payment account:", Layout.FIRST_ROW_DISTANCE);
Tuple2<Label, ComboBox> tuple = addLabelComboBox(gridPane, gridRow, "Trading account:", Layout.FIRST_ROW_DISTANCE);
paymentAccountsLabel = tuple.first;
paymentAccountsLabel.setVisible(false);
paymentAccountsLabel.setManaged(false);
paymentAccountsComboBox = tuple.second;
paymentAccountsComboBox.setPromptText("Select payment account");
paymentAccountsComboBox.setPromptText("Select trading account");
paymentAccountsComboBox.setConverter(new StringConverter<PaymentAccount>() {
@Override
public String toString(PaymentAccount paymentAccount) {

View file

@ -113,7 +113,7 @@ public class FilterWindow extends Overlay<FilterWindow> {
InputTextField keyInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Private key to unlock:", 10).second;
InputTextField offerIdsInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Filtered offers (comma sep.):").second;
InputTextField nodesInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Filtered onion addresses (comma sep.):").second;
InputTextField paymentAccountFilterInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Filtered payment account data:\nFormat: comma sep. list of [payment method id | data field | value]").second;
InputTextField paymentAccountFilterInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Filtered trading account data:\nFormat: comma sep. list of [payment method id | data field | value]").second;
GridPane.setHalignment(paymentAccountFilterInputTextField, HPos.RIGHT);
final Filter filter = filterManager.getDevelopersFilter();

View file

@ -208,7 +208,7 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
final boolean isNationalBanks = paymentMethod.equals(PaymentMethod.NATIONAL_BANK);
final boolean isSepa = paymentMethod.equals(PaymentMethod.SEPA);
if (offer.isMyOffer(keyRing) && offererPaymentAccountId != null && paymentAccount != null) {
addLabelTextField(gridPane, ++rowIndex, "My payment account:", paymentAccount.getAccountName());
addLabelTextField(gridPane, ++rowIndex, "My trading account:", paymentAccount.getAccountName());
} else {
final String method = BSResources.get(paymentMethod.getId());
if (isNationalBanks || isSpecificBanks || isSepa) {

View file

@ -71,7 +71,7 @@ public class BuyerStep2View extends TradeStepView {
"Please transfer from your external " +
CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()) + " wallet\n" +
model.formatter.formatVolumeWithCode(trade.getTradeVolume()) + " to the BTC seller.\n\n" +
"Here are the payment account details of the bitcoin seller:\n" +
"Here are the trading account details of the bitcoin seller:\n" +
"" + paymentAccountContractData.getPaymentDetailsForTradePopup() + ".\n\n" +
"(You can copy & paste the values from the main screen after closing that popup.)";
else if (paymentAccountContractData != null)
@ -80,7 +80,7 @@ public class BuyerStep2View extends TradeStepView {
"(You can wait for more confirmations if you want - 6 confirmations are considered as very secure.)\n\n" +
"Please go to a bank and pay " +
model.formatter.formatVolumeWithCode(trade.getTradeVolume()) + " to the BTC seller.\n\n" +
"Here are the payment account details of the BTC seller:\n" +
"Here are the trading account details of the BTC seller:\n" +
"" + paymentAccountContractData.getPaymentDetailsForTradePopup() + ".\n" +
"(You can copy & paste the values from the main screen after closing that popup.)\n\n" +
"Please don't forget to add the trade ID \"" + trade.getShortId() +
@ -96,7 +96,7 @@ public class BuyerStep2View extends TradeStepView {
"(You can wait for more confirmations if you want - 6 confirmations are considered as very secure.)\n\n" +
"Please send " +
model.formatter.formatVolumeWithCode(trade.getTradeVolume()) + " by \"US Postal Money Order\" to the BTC seller.\n\n" +
"Here are the payment account details of the BTC seller:\n" +
"Here are the trading account details of the BTC seller:\n" +
"" + paymentAccountContractData.getPaymentDetailsForTradePopup() + ".\n" +
"(You can copy & paste the values from the main screen after closing that popup.)\n\n" +
"Please don't forget to add the trade ID \"" + trade.getShortId() +
@ -108,7 +108,7 @@ public class BuyerStep2View extends TradeStepView {
"(You can wait for more confirmations if you want - 6 confirmations are considered as very secure.)\n\n" +
"Please go to your online banking web page and pay " +
model.formatter.formatVolumeWithCode(trade.getTradeVolume()) + " to the BTC seller.\n\n" +
"Here are the payment account details of the BTC seller:\n" +
"Here are the trading account details of the BTC seller:\n" +
"" + paymentAccountContractData.getPaymentDetailsForTradePopup() + ".\n" +
"(You can copy & paste the values from the main screen after closing that popup.)\n\n" +
"Please don't forget to add the trade ID \"" + trade.getShortId() +

View file

@ -170,8 +170,8 @@ public class SellerStep3View extends TradeStepView {
} else {
myPaymentDetails = myPaymentAccountContractData.getPaymentDetails();
peersPaymentDetails = peersPaymentAccountContractData.getPaymentDetails();
myTitle = "Your payment account:";
peersTitle = "Buyers payment account:";
myTitle = "Your trading account:";
peersTitle = "Buyers trading account:";
}
}
@ -211,7 +211,7 @@ public class SellerStep3View extends TradeStepView {
"confirm the payment when you have sufficient blockchain confirmations.";
} else {
return "The BTC buyer has started the " + model.dataModel.getCurrencyCode() + " payment.\n" +
"Check at your payment account (e.g. bank account) and confirm when you have " +
"Check at your trading account (e.g. bank account) and confirm when you have " +
"received the payment.";
}
}

View file

@ -96,9 +96,9 @@ public class GUIUtil {
Storage<ArrayList<PaymentAccount>> paymentAccountsStorage = new Storage<>(new File(directory));
paymentAccountsStorage.initAndGetPersisted(accounts, fileName);
paymentAccountsStorage.queueUpForSave();
new Popup<>().feedback("Payment accounts saved to path:\n" + Paths.get(directory, fileName).toAbsolutePath()).show();
new Popup<>().feedback("Trading accounts saved to path:\n" + Paths.get(directory, fileName).toAbsolutePath()).show();
} else {
new Popup<>().warning("You don't have payment accounts set up for exporting.").show();
new Popup<>().warning("You don't have trading accounts set up for exporting.").show();
}
}
@ -120,15 +120,15 @@ public class GUIUtil {
final String id = paymentAccount.getId();
if (user.getPaymentAccount(id) == null) {
user.addPaymentAccount(paymentAccount);
msg.append("Payment account with id ").append(id).append("\n");
msg.append("Trading account with id ").append(id).append("\n");
} else {
msg.append("We did not import payment account with id ").append(id).append(" because it exists already.\n");
msg.append("We did not import trading account with id ").append(id).append(" because it exists already.\n");
}
});
new Popup<>().feedback("Payment account imported from path:\n" + path + "\n\nImported accounts:\n" + msg).show();
new Popup<>().feedback("Trading account imported from path:\n" + path + "\n\nImported accounts:\n" + msg).show();
} else {
new Popup<>().warning("No exported payment accounts has been found at path: " + path + ".\n" + "File name is " + fileName + ".").show();
new Popup<>().warning("No exported trading accounts has been found at path: " + path + ".\n" + "File name is " + fileName + ".").show();
}
} else {
new Popup<>().warning("The selected file is not the expected file for import. The expected file name is: " + fileName + ".").show();