🐛 Fix proto null value
This commit is contained in:
@@ -533,11 +533,20 @@ public class SnPaymentDetails
|
|||||||
public string Currency { get; set; } = null!;
|
public string Currency { get; set; } = null!;
|
||||||
public string? OrderId { get; set; }
|
public string? OrderId { get; set; }
|
||||||
|
|
||||||
public Proto.PaymentDetails ToProtoValue() => new()
|
public Proto.PaymentDetails ToProtoValue()
|
||||||
{
|
{
|
||||||
Currency = Currency,
|
var proto = new Proto.PaymentDetails
|
||||||
OrderId = OrderId,
|
{
|
||||||
};
|
Currency = Currency
|
||||||
|
};
|
||||||
|
|
||||||
|
if (OrderId != null)
|
||||||
|
{
|
||||||
|
proto.OrderId = OrderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
return proto;
|
||||||
|
}
|
||||||
|
|
||||||
public static SnPaymentDetails FromProtoValue(Proto.PaymentDetails proto) => new()
|
public static SnPaymentDetails FromProtoValue(Proto.PaymentDetails proto) => new()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user