Skip to content

Commit

Permalink
fixed unconditional signatory creatiom in CreateAccount command
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Boldyrev <miboldyrev@gmail.com>
  • Loading branch information
MBoldyrev committed Aug 19, 2019
1 parent 5888704 commit 2b5788f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions irohad/ametsuchi/impl/postgres_command_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,9 @@ namespace iroha {
(
INSERT INTO signatory(public_key)
(
SELECT :pubkey WHERE EXISTS
(SELECT * FROM get_domain_default_role)
SELECT :pubkey
WHERE EXISTS (SELECT * FROM get_domain_default_role)
%s
)
ON CONFLICT (public_key)
DO UPDATE SET public_key = excluded.public_key
Expand All @@ -728,7 +729,6 @@ namespace iroha {
SELECT :account_id, :domain, 1, '{}'
WHERE EXISTS (SELECT * FROM insert_signatory)
AND EXISTS (SELECT * FROM get_domain_default_role)
%s
) RETURNING (1)
),
insert_account_signatory AS
Expand Down

0 comments on commit 2b5788f

Please sign in to comment.