Skip to content

Commit 3a7c45a

Browse files
committed
Fixed a small bug in the tutorial that was introduced by cline
1 parent e6b11c6 commit 3a7c45a

File tree

2 files changed

+2
-69
lines changed

2 files changed

+2
-69
lines changed

Tutorial/1_ClientServer/PSrc/Server.p

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,13 @@ machine BankServer
7171
if(accountBalance - withdrawRequest.amount >= 10)
7272
{
7373
// Sufficient funds: update database with new balance
74-
var newBalance = accountBalance - withdrawRequest.amount;
75-
UpdateBankBalance(databaseInstance, withdrawRequest.accountId, newBalance);
74+
UpdateBankBalance(databaseInstance, withdrawRequest.accountId, accountBalance - withdrawRequest.amount);
7675

7776
// Prepare success response
7877
withdrawalResponse = (
7978
status = WITHDRAW_SUCCESS,
8079
accountId = withdrawRequest.accountId,
81-
balance = newBalance,
80+
balance = accountBalance - withdrawRequest.amount,
8281
rId = withdrawRequest.rId
8382
);
8483
}

Tutorial/1_ClientServer/portfolio-config.json

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)