Merge pull request #1743 from gradido/fix-sending-to-inactivated-user

fix: Check That Recipient User Has Activated Account to Receive Coins
This commit is contained in:
Moriz Wahl 2022-04-06 14:08:35 +02:00 committed by GitHub
commit 4cca429f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -263,6 +263,9 @@ export class TransactionResolver {
if (recipientUser.deletedAt) {
throw new Error('The recipient account was deleted')
}
if (!recipientUser.emailChecked) {
throw new Error('The recipient account is not activated')
}
if (!isHexPublicKey(recipientUser.pubKey.toString('hex'))) {
throw new Error('invalid recipient public key')
}