fix: fix transfer
This commit is contained in:
1 file changed
+1
-1
@@ -76,7 +76,7 @@ class NiuziBankManager {
|
|||||||
|
|
||||||
suspend fun transfer(from: Long, target: Long, amount: Double): NiuziBankAccount? {
|
suspend fun transfer(from: Long, target: Long, amount: Double): NiuziBankAccount? {
|
||||||
suspendedTransaction {
|
suspendedTransaction {
|
||||||
this.decreaseBalance(from, -amount)
|
this.decreaseBalance(from, amount)
|
||||||
this.increaseBalance(target, amount)
|
this.increaseBalance(target, amount)
|
||||||
}
|
}
|
||||||
return this.getUser(from)
|
return this.getUser(from)
|
||||||
|
|||||||
Reference in New Issue
Block a user