mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
Greenfield: Fix GetDepositAddress return type (#3790)
The local clients GetFromActionResult cannot handle the JValue return type, because it gets invoked with GetFromActionResult<string>.
This commit is contained in:
parent
ff66e66f21
commit
46b9760179
@ -160,7 +160,8 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
public virtual async Task<IActionResult> GetDepositAddress(string cryptoCode, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var lightningClient = await GetLightningClient(cryptoCode, true);
|
||||
return Ok(new JValue((await lightningClient.GetDepositAddress(cancellationToken)).ToString()));
|
||||
var addr = await lightningClient.GetDepositAddress(cancellationToken);
|
||||
return Ok(new JValue(addr.ToString()));
|
||||
}
|
||||
|
||||
public virtual async Task<IActionResult> GetPayment(string cryptoCode, string paymentHash, CancellationToken cancellationToken = default)
|
||||
|
@ -601,6 +601,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
{
|
||||
JsonResult jsonResult => (T)jsonResult.Value,
|
||||
OkObjectResult { Value: T res } => res,
|
||||
OkObjectResult { Value: JValue res } => res.Value<T>(),
|
||||
_ => default
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user