This commit is contained in:
einhorn_b 2021-10-12 15:21:45 +02:00
parent 715d51272c
commit b6bfd55c98

View File

@ -326,7 +326,7 @@ async function sendCoins(
const userRepository = getCustomRepository(UserRepository) const userRepository = getCustomRepository(UserRepository)
const recipiantUser = await userRepository.findByPubkeyHex(recipiantPublicKey) const recipiantUser = await userRepository.findByPubkeyHex(recipiantPublicKey)
if(recipiantUser && recipiantUser.disabled) { if (recipiantUser && recipiantUser.disabled) {
throw new Error('recipiant user account is disabled') throw new Error('recipiant user account is disabled')
} }
@ -338,7 +338,6 @@ async function sendCoins(
// no group id is given so we assume it is a local transfer // no group id is given so we assume it is a local transfer
if (!groupId) { if (!groupId) {
const localTransfer = new proto.gradido.LocalTransfer({ const localTransfer = new proto.gradido.LocalTransfer({
sender: transferAmount, sender: transferAmount,
recipiant: fromHex(recipiantPublicKey), recipiant: fromHex(recipiantPublicKey),
@ -370,8 +369,6 @@ async function sendCoins(
ed25519: sign, ed25519: sign,
}) })
const sigMap = new proto.gradido.SignatureMap({ sigPair: [sigPair] }) const sigMap = new proto.gradido.SignatureMap({ sigPair: [sigPair] })
// process db updates as transaction to able to rollback if an error occure // process db updates as transaction to able to rollback if an error occure