payment method ids are case insensitive

This commit is contained in:
woodser 2023-08-29 06:46:34 -04:00
parent cf8b8132cf
commit 5ed4829165

View File

@ -3299,7 +3299,6 @@ function getCryptoAddress(currencyCode: string): string|undefined {
async function createPaymentAccount(trader: HavenoClient, assetCodes: string, paymentMethodId?: string) {
if (!paymentMethodId) paymentMethodId = isCrypto(assetCodes!) ? "block_chains" : "revolut";
paymentMethodId = paymentMethodId.toUpperCase(); // TODO: remove case sensitivity
const accountForm = await trader.getPaymentAccountForm(paymentMethodId);
for (const field of accountForm.getFieldsList()) field.setValue(getValidFormInput(accountForm, field.getId()));
HavenoUtils.setFormValue(PaymentAccountFormField.FieldId.TRADE_CURRENCIES, assetCodes, accountForm);