Skip to content

Commit

Permalink
Remove referralIdInputTextField
Browse files Browse the repository at this point in the history
The referralId support did not get any interest so we removed it from
the UI. It is still supported via prog argument and can be re-enabled
again once there are use cases (API?).
I left it commented out to make re-enabling easier.
  • Loading branch information
ManfredKarrer committed Apr 17, 2019
1 parent 1e991d1 commit 21c5eec
Showing 1 changed file with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
import bisq.core.provider.fee.FeeService;
import bisq.core.trade.statistics.ReferralIdService;
import bisq.core.user.BlockChainExplorer;
import bisq.core.user.Preferences;
import bisq.core.util.BSFormatter;
Expand Down Expand Up @@ -103,15 +102,16 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
private ToggleButton showOwnOffersInOfferBook, useAnimations, sortMarketCurrenciesNumerically, avoidStandbyMode,
useCustomFee;
private int gridRow = 0;
private InputTextField transactionFeeInputTextField, ignoreTradersListInputTextField, referralIdInputTextField, rpcUserTextField;
private InputTextField transactionFeeInputTextField, ignoreTradersListInputTextField, /*referralIdInputTextField,*/
rpcUserTextField;
private ToggleButton isDaoFullNodeToggleButton;
private PasswordTextField rpcPwTextField;
private TitledGroupBg daoOptionsTitledGroupBg;

private ChangeListener<Boolean> transactionFeeFocusedListener;
private final Preferences preferences;
private final FeeService feeService;
private final ReferralIdService referralIdService;
//private final ReferralIdService referralIdService;
private final AssetService assetService;
private final FilterManager filterManager;
private final DaoFacade daoFacade;
Expand Down Expand Up @@ -144,12 +144,10 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc

@Inject
public PreferencesView(PreferencesViewModel model, Preferences preferences, FeeService feeService,
ReferralIdService referralIdService, AssetService assetService,
FilterManager filterManager, DaoFacade daoFacade, BSFormatter formatter) {
AssetService assetService, FilterManager filterManager, DaoFacade daoFacade, BSFormatter formatter) {
super(model);
this.preferences = preferences;
this.feeService = feeService;
this.referralIdService = referralIdService;
this.assetService = assetService;
this.filterManager = filterManager;
this.daoFacade = daoFacade;
Expand Down Expand Up @@ -320,11 +318,11 @@ public BaseCurrencyNetwork fromString(String string) {
preferences.setIgnoreTradersList(Arrays.asList(StringUtils.deleteWhitespace(newValue).split(",")));

// referralId
referralIdInputTextField = addInputTextField(root, ++gridRow, Res.get("setting.preferences.refererId"));
/* referralIdInputTextField = addInputTextField(root, ++gridRow, Res.get("setting.preferences.refererId"));
referralIdListener = (observable, oldValue, newValue) -> {
if (!newValue.equals(oldValue))
referralIdService.setReferralId(newValue);
};
};*/

// AvoidStandbyModeService
avoidStandbyMode = addSlideToggleButton(root, ++gridRow,
Expand Down Expand Up @@ -608,8 +606,8 @@ private void activateGeneralOptions() {

transactionFeeInputTextField.setText(String.valueOf(getTxFeeForWithdrawalPerByte()));
ignoreTradersListInputTextField.setText(String.join(", ", preferences.getIgnoreTradersList()));
referralIdService.getOptionalReferralId().ifPresent(referralId -> referralIdInputTextField.setText(referralId));
referralIdInputTextField.setPromptText(Res.get("setting.preferences.refererId.prompt"));
/* referralIdService.getOptionalReferralId().ifPresent(referralId -> referralIdInputTextField.setText(referralId));
referralIdInputTextField.setPromptText(Res.get("setting.preferences.refererId.prompt"));*/
userLanguageComboBox.setItems(languageCodes);
userLanguageComboBox.getSelectionModel().select(preferences.getUserLanguage());
userLanguageComboBox.setConverter(new StringConverter<>() {
Expand Down Expand Up @@ -694,7 +692,7 @@ public BlockChainExplorer fromString(String string) {
transactionFeeInputTextField.focusedProperty().addListener(transactionFeeFocusedListener);
ignoreTradersListInputTextField.textProperty().addListener(ignoreTradersListListener);
useCustomFee.selectedProperty().addListener(useCustomFeeCheckboxListener);
referralIdInputTextField.textProperty().addListener(referralIdListener);
//referralIdInputTextField.textProperty().addListener(referralIdListener);
}

private Coin getTxFeeForWithdrawalPerByte() {
Expand Down Expand Up @@ -858,7 +856,7 @@ private void deactivateGeneralOptions() {
feeService.feeUpdateCounterProperty().removeListener(transactionFeeChangeListener);
ignoreTradersListInputTextField.textProperty().removeListener(ignoreTradersListListener);
useCustomFee.selectedProperty().removeListener(useCustomFeeCheckboxListener);
referralIdInputTextField.textProperty().removeListener(referralIdListener);
//referralIdInputTextField.textProperty().removeListener(referralIdListener);
}

private void deactivateDisplayCurrencies() {
Expand Down

0 comments on commit 21c5eec

Please sign in to comment.