add missing await

This commit is contained in:
Florian Dold 2021-06-09 16:47:45 +02:00
parent 2d4a53f522
commit 0ee44c3a58
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 4 additions and 3 deletions

View File

@ -874,7 +874,7 @@ async function startDownloadProposal(
await ws.db await ws.db
.mktx((x) => ({ proposals: x.proposals })) .mktx((x) => ({ proposals: x.proposals }))
.runReadWrite(async (tx) => { .runReadWrite(async (tx) => {
const existingRecord = tx.proposals.indexes.byUrlAndOrderId.get([ const existingRecord = await tx.proposals.indexes.byUrlAndOrderId.get([
merchantBaseUrl, merchantBaseUrl,
orderId, orderId,
]); ]);

View File

@ -760,8 +760,9 @@ export async function createTalerWithdrawReserve(
talerWithdrawUri: string, talerWithdrawUri: string,
selectedExchange: string, selectedExchange: string,
): Promise<AcceptWithdrawalResponse> { ): Promise<AcceptWithdrawalResponse> {
await updateExchangeFromUrl(ws, selectedExchange);
const withdrawInfo = await getBankWithdrawalInfo(ws, talerWithdrawUri); const withdrawInfo = await getBankWithdrawalInfo(ws, talerWithdrawUri);
const exchangeWire = await getExchangePaytoUri( const exchangePaytoUri = await getExchangePaytoUri(
ws, ws,
selectedExchange, selectedExchange,
withdrawInfo.wireTypes, withdrawInfo.wireTypes,
@ -771,7 +772,7 @@ export async function createTalerWithdrawReserve(
bankWithdrawStatusUrl: withdrawInfo.extractedStatusUrl, bankWithdrawStatusUrl: withdrawInfo.extractedStatusUrl,
exchange: selectedExchange, exchange: selectedExchange,
senderWire: withdrawInfo.senderWire, senderWire: withdrawInfo.senderWire,
exchangePaytoUri: exchangeWire, exchangePaytoUri: exchangePaytoUri,
}); });
// We do this here, as the reserve should be registered before we return, // We do this here, as the reserve should be registered before we return,
// so that we can redirect the user to the bank's status page. // so that we can redirect the user to the bank's status page.