using block inside case of switch breaks when building with babel 7

see https://github.com/babel/babel/issues/8709
This commit is contained in:
Sebastian 2021-06-17 13:14:56 -03:00
parent a4902de891
commit 954ed23911
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
2 changed files with 6 additions and 12 deletions

View File

@ -732,14 +732,12 @@ async function processReserveImpl(
case ReserveRecordStatus.REGISTERING_BANK: case ReserveRecordStatus.REGISTERING_BANK:
await processReserveBankStatus(ws, reservePub); await processReserveBankStatus(ws, reservePub);
return await processReserveImpl(ws, reservePub, true); return await processReserveImpl(ws, reservePub, true);
case ReserveRecordStatus.QUERYING_STATUS: { case ReserveRecordStatus.QUERYING_STATUS:
const res = await updateReserve(ws, reservePub); const res = await updateReserve(ws, reservePub);
if (res.ready) { if (res.ready) {
return await processReserveImpl(ws, reservePub, true); return await processReserveImpl(ws, reservePub, true);
} else {
break;
} }
} break;
case ReserveRecordStatus.DORMANT: case ReserveRecordStatus.DORMANT:
// nothing to do // nothing to do
break; break;

View File

@ -418,26 +418,22 @@ export async function retryTransaction(
const depositGroupId = rest[0]; const depositGroupId = rest[0];
processDepositGroup(ws, depositGroupId, true); processDepositGroup(ws, depositGroupId, true);
break; break;
case TransactionType.Withdrawal: { case TransactionType.Withdrawal:
const withdrawalGroupId = rest[0]; const withdrawalGroupId = rest[0];
await processWithdrawGroup(ws, withdrawalGroupId, true); await processWithdrawGroup(ws, withdrawalGroupId, true);
break; break;
} case TransactionType.Payment:
case TransactionType.Payment: {
const proposalId = rest[0]; const proposalId = rest[0];
await processPurchasePay(ws, proposalId, true); await processPurchasePay(ws, proposalId, true);
break; break;
} case TransactionType.Tip:
case TransactionType.Tip: {
const walletTipId = rest[0]; const walletTipId = rest[0];
await processTip(ws, walletTipId, true); await processTip(ws, walletTipId, true);
break; break;
} case TransactionType.Refresh:
case TransactionType.Refresh: {
const refreshGroupId = rest[0]; const refreshGroupId = rest[0];
await processRefreshGroup(ws, refreshGroupId, true); await processRefreshGroup(ws, refreshGroupId, true);
break; break;
}
default: default:
break; break;
} }