diff --git a/api/resolvers/wallet.js b/api/resolvers/wallet.js index a98bec6d..c2fe95fe 100644 --- a/api/resolvers/wallet.js +++ b/api/resolvers/wallet.js @@ -682,7 +682,7 @@ async function upsertWallet ( return await models.$transaction(async (tx) => { if (canReceive) { - tx.user.update({ + await tx.user.update({ where: { id: me.id }, data: { autoWithdrawMaxFeePercent, @@ -699,7 +699,7 @@ async function upsertWallet ( }) : undefined - updatedWallet = tx.wallet.update({ + updatedWallet = await tx.wallet.update({ where: { id: Number(id), userId: me.id }, data: { enabled, @@ -720,7 +720,7 @@ async function upsertWallet ( } }) } else { - updatedWallet = tx.wallet.create({ + updatedWallet = await tx.wallet.create({ data: { enabled, priority, @@ -771,7 +771,7 @@ async function upsertWallet ( }) } - tx.walletLog.createMany({ + await tx.walletLog.createMany({ data: logs })