Enable currency settings and sticker pack synchronization

This commit is contained in:
Audrius Molis 2022-03-28 15:55:05 +01:00 committed by Audrius Molis
parent 4d15ae8a85
commit a244d77657
2 changed files with 5 additions and 4 deletions

View File

@ -38,9 +38,7 @@ var (
Currency = SettingField{
reactFieldName: "currency",
dBColumnName: "currency",
// TODO resolve issue 6 https://github.com/status-im/status-react/pull/13053#issuecomment-1065179963
syncProtobufFactory: &SyncProtobufFactory{
inactive: true, // Remove after issue is resolved
fromInterface: currencyProtobufFactory,
fromStruct: currencyProtobufFactoryStruct,
valueFromProtobuf: StringFromSyncProtobuf,
@ -307,9 +305,7 @@ var (
reactFieldName: "stickers/packs-installed",
dBColumnName: "stickers_packs_installed",
valueHandler: JSONBlobHandler,
// TODO resolve issue 8 https://github.com/status-im/status-react/pull/13053#issuecomment-1065179963
syncProtobufFactory: &SyncProtobufFactory{
inactive: true, // Remove after issue is resolved
fromInterface: stickersPacksInstalledProtobufFactory,
fromStruct: stickersPacksInstalledProtobufFactoryStruct,
valueFromProtobuf: BytesFromSyncProtobuf,

View File

@ -2,6 +2,7 @@ package protocol
import (
"context"
"encoding/json"
"go.uber.org/zap"
@ -89,6 +90,10 @@ func (m *Messenger) handleSyncSetting(response *MessengerResponse, syncSetting *
return err
}
if v, ok := value.([]byte); ok {
value = json.RawMessage(v)
}
response.Settings = append(response.Settings, &settings.SyncSettingField{SettingField: sf, Value: value})
return nil
}