From e4c262bd7922eeff38421654cfdb01cc73d8470f Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Fri, 2 Apr 2021 11:36:20 -0700 Subject: [PATCH] :bug: Send funds should return false if refunded --- include/bank.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/bank.hpp b/include/bank.hpp index 699708b..fb3edc0 100644 --- a/include/bank.hpp +++ b/include/bank.hpp @@ -51,10 +51,11 @@ public: b.balance += amount; })) { - //attempt to refund if destination doesnt exist + //attempt to refund if A exist users.modify_if(a_name, [amount](User &a) { a.balance += amount; }); + state = false; //because had to refund trasnaction } }