mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
api: finance api implementation
This commit is contained in:
@@ -110,7 +110,7 @@ public sealed class NCanvasService : INCanvasService, IReadyExecutor, INService
|
||||
|
||||
var wallet = await _cs.GetWalletAsync(userId);
|
||||
|
||||
var paid = await wallet.Take(price, new("canvas", "pixel", $"Bought pixel #{position}"));
|
||||
var paid = await wallet.Take(price, new("canvas", "pixel-buy", $"Bought pixel {new kwum(position)}"));
|
||||
if (!paid)
|
||||
{
|
||||
return SetPixelResult.NotEnoughMoney;
|
||||
@@ -138,7 +138,7 @@ public sealed class NCanvasService : INCanvasService, IReadyExecutor, INService
|
||||
|
||||
if (!success)
|
||||
{
|
||||
await wallet.Add(price, new("canvas", "pixel-refund", $"Refund pixel #{position} purchase"));
|
||||
await wallet.Add(price, new("canvas", "pixel-refund", $"Refund pixel {new kwum(position)} purchase"));
|
||||
}
|
||||
|
||||
return success ? SetPixelResult.Success : SetPixelResult.InsufficientPayment;
|
||||
|
Reference in New Issue
Block a user