Skip to content

Commit

Permalink
Fix sql warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tolyo committed Aug 10, 2024
1 parent 47ea028 commit be1f715
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion sql/0230_create_trade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ BEGIN
PERFORM create_trading_account_transfer(
(SELECT pub_id FROM trading_account WHERE app_entity_id = seller_app_entity_instance.id),
(SELECT pub_id FROM trading_account WHERE app_entity_id = buyer_app_entity_instance.id),
to_trading_account_id_param,
instrument_param,
amount_param
);
Expand Down
10 changes: 1 addition & 9 deletions sql/0320_create_trading_account_transfer.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ BEGIN
IF NOT FOUND THEN
RAISE EXCEPTION 'from_trading_account_instance_not_found';
END IF;

-- check sufficiency of funds in case of non-master accounts
IF from_customer_id_param != 'MASTER' THEN
-- TODO calculate with FEE!!!
IF from_trading_account_instance.amount < amount_param THEN
RAISE EXCEPTION 'insufficient_funds available: %, required % ', from_trading_account_instance.amount, amount_param;
END IF;
END IF;

SELECT * FROM trading_account
WHERE app_entity_id =
Expand All @@ -64,7 +56,7 @@ BEGIN
type,
amount,
currency_name,
sENDer_trading_account_id,
sender_trading_account_id,
beneficiary_trading_account_id,
details,
external_reference_number,
Expand Down

0 comments on commit be1f715

Please sign in to comment.