wallet-core: fix db index on withdraw URI

This commit is contained in:
Florian Dold 2022-08-25 17:49:24 +02:00
parent d112a5b6bc
commit 22bc73ac4b
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 9 additions and 11 deletions

View File

@ -1835,7 +1835,7 @@ export const WalletStoresV1 = {
byStatus: describeIndex("byStatus", "operationStatus"),
byTalerWithdrawUri: describeIndex(
"byTalerWithdrawUri",
"bankInfo.talerWithdrawUri",
"wgInfo.bankInfo.talerWithdrawUri",
),
},
),

View File

@ -1542,16 +1542,14 @@ async function registerReserveWithBank(
return;
}
const bankStatusUrl = getBankStatusUrl(bankInfo.talerWithdrawUri);
const httpResp = await ws.http.postJson(
bankStatusUrl,
{
const reqBody = {
reserve_pub: withdrawalGroup.reservePub,
selected_exchange: bankInfo.exchangePaytoUri,
},
{
};
logger.info(`registering reserve with bank: ${j2s(reqBody)}`);
const httpResp = await ws.http.postJson(bankStatusUrl, reqBody, {
timeout: getReserveRequestTimeout(withdrawalGroup),
},
);
});
await readSuccessResponseJsonOrThrow(
httpResp,
codecForBankWithdrawalOperationPostResponse(),