🐛 Fix services unimplmented
This commit is contained in:
@@ -743,15 +743,12 @@ public class PaymentService(
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task<SnWalletFund> GetWalletFundAsync(Guid fundId)
|
||||
public async Task<SnWalletFund?> GetWalletFundAsync(Guid fundId)
|
||||
{
|
||||
var fund = await db.WalletFunds
|
||||
.Include(f => f.Recipients)
|
||||
.FirstOrDefaultAsync(f => f.Id == fundId);
|
||||
|
||||
if (fund == null)
|
||||
throw new InvalidOperationException("Fund not found");
|
||||
|
||||
return fund;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +107,6 @@ public class PaymentServiceGrpc(PaymentService paymentService)
|
||||
)
|
||||
{
|
||||
var walletFund = await paymentService.GetWalletFundAsync(Guid.Parse(request.FundId));
|
||||
return walletFund.ToProtoValue();
|
||||
return walletFund?.ToProtoValueWithRecipients() ?? new WalletFund();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user