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

Commit 879e20c

Browse files
committed
[#1923] Set default profile.Version only if empty
1 parent bbe8a70 commit 879e20c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/profile.go

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

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

0 commit comments

Comments
 (0)