Move protobuf OfferPayload.Direction to OfferDirection

This commit is contained in:
chimp1984 2021-10-21 15:36:21 +02:00
parent b194960c63
commit 14765d6caa
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3
2 changed files with 11 additions and 11 deletions

View File

@ -23,11 +23,11 @@ public enum OfferDirection {
BUY,
SELL;
public static OfferDirection fromProto(protobuf.OfferPayload.Direction direction) {
public static OfferDirection fromProto(protobuf.OfferDirection direction) {
return ProtoUtil.enumFromProto(OfferDirection.class, direction.name());
}
public static protobuf.OfferPayload.Direction toProtoMessage(OfferDirection direction) {
return protobuf.OfferPayload.Direction.valueOf(direction.name());
public static protobuf.OfferDirection toProtoMessage(OfferDirection direction) {
return protobuf.OfferDirection.valueOf(direction.name());
}
}

View File

@ -710,7 +710,7 @@ message Filter {
message TradeStatistics2 {
string base_currency = 1 [deprecated = true];
string counter_currency = 2 [deprecated = true];
OfferPayload.Direction direction = 3 [deprecated = true];
OfferDirection direction = 3 [deprecated = true];
int64 trade_price = 4 [deprecated = true];
int64 trade_amount = 5 [deprecated = true];
int64 trade_date = 6 [deprecated = true];
@ -746,17 +746,11 @@ message MailboxStoragePayload {
}
message OfferPayload {
enum Direction {
PB_ERROR = 0;
BUY = 1;
SELL = 2;
}
string id = 1;
int64 date = 2;
NodeAddress owner_node_address = 3;
PubKeyRing pub_key_ring = 4;
Direction direction = 5;
OfferDirection direction = 5;
int64 price = 6;
double market_price_margin = 7;
bool use_market_based_price = 8;
@ -792,6 +786,12 @@ message OfferPayload {
int32 protocol_version = 38;
}
enum OfferDirection {
OFFER_DIRECTION_ERROR = 0;
BUY = 1;
SELL = 2;
}
message AccountAgeWitness {
bytes hash = 1;
int64 date = 2;