Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@
@EqualsAndHashCode(callSuper = true)
public final class WeChatPayAccount extends PaymentAccount {

public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(new TraditionalCurrency("CNY"));
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = List.of(
new TraditionalCurrency("CNY"),
new TraditionalCurrency("USD"),
new TraditionalCurrency("EUR"),
new TraditionalCurrency("GBP")
);

public WeChatPayAccount() {
super(PaymentMethod.WECHAT_PAY);
setSingleTradeCurrency(SUPPORTED_CURRENCIES.get(0));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import haveno.core.payment.validation.WeChatPayValidator;
import haveno.core.util.coin.CoinFormatter;
import haveno.core.util.validation.InputValidator;
import javafx.collections.FXCollections;
import javafx.scene.layout.GridPane;

import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
Expand All @@ -44,6 +45,12 @@ public WeChatPayForm(PaymentAccount paymentAccount, AccountAgeWitnessService acc
this.weChatPayAccount = (WeChatPayAccount) paymentAccount;
}

@Override
public void addTradeCurrency() {
addTradeCurrencyComboBox();
currencyComboBox.setItems(FXCollections.observableArrayList(weChatPayAccount.getSupportedCurrencies()));
}

@Override
void setAccountNumber(String newValue) {
weChatPayAccount.setAccountNr(newValue);
Expand Down
Loading