🐛 Fix bugs
This commit is contained in:
		| @@ -72,7 +72,7 @@ public class Order : ModelBase | ||||
|             : null, | ||||
|         Amount = decimal.Parse(proto.Amount), | ||||
|         ExpiredAt = proto.ExpiredAt.ToInstant(), | ||||
|         PayeeWalletId = proto.HasPayeeWalletId ? Guid.Parse(proto.PayeeWalletId) : null, | ||||
|         PayeeWalletId = proto.PayeeWalletId is not null ? Guid.Parse(proto.PayeeWalletId) : null, | ||||
|         TransactionId = proto.TransactionId is not null ? Guid.Parse(proto.TransactionId) : null, | ||||
|         Transaction = proto.Transaction is not null ? Transaction.FromProtoValue(proto.Transaction) : null, | ||||
|     }; | ||||
| @@ -106,7 +106,7 @@ public class Transaction : ModelBase | ||||
|     { | ||||
|         Id = Id.ToString(), | ||||
|         Currency = Currency, | ||||
|         Amount = Amount.ToString(), | ||||
|         Amount = Amount.ToString(CultureInfo.InvariantCulture), | ||||
|         Remarks = Remarks, | ||||
|         Type = (Shared.Proto.TransactionType)Type, | ||||
|         PayerWalletId = PayerWalletId?.ToString(), | ||||
| @@ -120,7 +120,7 @@ public class Transaction : ModelBase | ||||
|         Amount = decimal.Parse(proto.Amount), | ||||
|         Remarks = proto.Remarks, | ||||
|         Type = (TransactionType)proto.Type, | ||||
|         PayerWalletId = proto.HasPayerWalletId ? Guid.Parse(proto.PayerWalletId) : null, | ||||
|         PayeeWalletId = proto.HasPayeeWalletId ? Guid.Parse(proto.PayeeWalletId) : null, | ||||
|         PayerWalletId = proto.PayerWalletId is not null ? Guid.Parse(proto.PayerWalletId) : null, | ||||
|         PayeeWalletId = proto.PayeeWalletId is not null ? Guid.Parse(proto.PayeeWalletId) : null, | ||||
|     }; | ||||
| } | ||||
| @@ -132,7 +132,7 @@ message CreateOrderRequest { | ||||
|  | ||||
| message Order { | ||||
|   string id = 1; | ||||
|   optional string payee_wallet_id = 2; | ||||
|   google.protobuf.StringValue payee_wallet_id = 2; | ||||
|   google.protobuf.StringValue currency = 3; | ||||
|   string amount = 4; | ||||
|   google.protobuf.Timestamp expired_at = 5; | ||||
| @@ -157,11 +157,11 @@ enum OrderStatus { | ||||
|  | ||||
| message Transaction { | ||||
|   string id = 1; | ||||
|   optional string payer_wallet_id = 2; | ||||
|   optional string payee_wallet_id = 3; | ||||
|   google.protobuf.StringValue payer_wallet_id = 2; | ||||
|   google.protobuf.StringValue payee_wallet_id = 3; | ||||
|   string currency = 4; | ||||
|   string amount = 5; | ||||
|   optional string remarks = 6; | ||||
|   google.protobuf.StringValue remarks = 6; | ||||
|   TransactionType type = 7; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user