fix section comparison

This commit is contained in:
Florian Dold 2021-08-05 22:43:14 +02:00
parent 09b07d6147
commit cd15937dad
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 2 additions and 7 deletions

View File

@ -541,7 +541,7 @@ export class Configuration {
}
/**
* Get lower-cased section names.
* Get upper-cased section names.
*/
getSectionNames(): string[] {
return Object.keys(this.sectionMap).map((x) => x.toUpperCase());

View File

@ -924,11 +924,6 @@ export class ExchangeService implements ExchangeServiceInterface {
);
config.setString(`exchange-account-${localName}`, "enable_credit", "yes");
config.setString(`exchange-account-${localName}`, "enable_debit", "yes");
config.setString(
`exchange-accountcredentials-${localName}`,
"payto_uri",
exchangeBankAccount.accountPaytoUri,
);
config.setString(
`exchange-accountcredentials-${localName}`,
"wire_gateway_url",
@ -1021,7 +1016,7 @@ export class ExchangeService implements ExchangeServiceInterface {
const config = Configuration.load(this.configFilename);
for (const sectionName of config.getSectionNames()) {
if (sectionName.startsWith("exchange-account")) {
if (sectionName.startsWith("EXCHANGE_ACCOUNT")) {
const paytoUri = config.getString(sectionName, "payto_uri").required();
const p = parsePaytoUri(paytoUri);
if (!p) {