♻️ Refactored order handling

This commit is contained in:
2025-09-05 00:13:58 +08:00
parent 3ee04d0b24
commit ddd109c77c
22 changed files with 2414 additions and 61 deletions

View File

@@ -8,11 +8,7 @@ public class WalletServiceGrpc(WalletService walletService) : Shared.Proto.Walle
public override async Task<Shared.Proto.Wallet> GetWallet(GetWalletRequest request, ServerCallContext context)
{
var wallet = await walletService.GetWalletAsync(Guid.Parse(request.AccountId));
if (wallet == null)
{
throw new RpcException(new Status(StatusCode.NotFound, "Wallet not found."));
}
return wallet.ToProtoValue();
return wallet == null ? throw new RpcException(new Status(StatusCode.NotFound, "Wallet not found.")) : wallet.ToProtoValue();
}
public override async Task<Shared.Proto.Wallet> CreateWallet(CreateWalletRequest request, ServerCallContext context)