Round profit values

This commit is contained in:
Mark Veidemanis 2023-03-11 13:04:16 +00:00
parent acaaaf554e
commit 11f596708d
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,8 @@ class Profit(LoginRequiredMixin, OTPRequiredMixin, ObjectRead):
user=self.request.user, nordigen=NordigenClient, agora=AgoraClient user=self.request.user, nordigen=NordigenClient, agora=AgoraClient
) )
) )
print("RES", res) for key in res.keys():
res[key] = round(res[key], 2)
results = { results = {
"Bank balance total": res["total_sinks_usd"], "Bank balance total": res["total_sinks_usd"],
"Platform balance total": res["total_usd_agora"], "Platform balance total": res["total_usd_agora"],
@ -38,4 +39,5 @@ class Profit(LoginRequiredMixin, OTPRequiredMixin, ObjectRead):
], ],
"Withdrawal trigger": res["withdraw_threshold"], "Withdrawal trigger": res["withdraw_threshold"],
} }
return results return results