Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 54cd692

Browse files
authored
Merge pull request #1947 from OpenBazaar/profileversion
Add version to profile protobuf
2 parents 1ab22c8 + 879e20c commit 54cd692

File tree

3 files changed

+69
-55
lines changed

3 files changed

+69
-55
lines changed

core/profile.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ func (n *OpenBazaarNode) UpdateProfile(profile *pb.Profile) error {
6767
return err
6868
}
6969

70+
if profile.GetVersion() == 0 {
71+
profile.Version = ListingVersion
72+
}
73+
7074
profile.BitcoinPubkey = hex.EncodeToString(mPubkey.SerializeCompressed())
7175
m := jsonpb.Marshaler{
7276
EnumsAsInts: false,

pb/profile.pb.go

Lines changed: 63 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pb/protos/profile.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ message Profile {
3636

3737
repeated string currencies = 18;
3838

39+
uint32 version = 19;
40+
3941
message Contact {
4042
string website = 1;
4143
string email = 2;

0 commit comments

Comments
 (0)