From 69dae586d8c6f02da33e63a81937ae1a18a2c672 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 5 Apr 2022 15:12:36 +0200 Subject: [PATCH] check that recipient user has activated account in send coins --- backend/src/graphql/resolver/TransactionResolver.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index aa1bba639..8747f14a3 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -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') }