Enable currency settings and sticker pack synchronization
This commit is contained in:
parent
4d15ae8a85
commit
a244d77657
|
@ -38,9 +38,7 @@ var (
|
||||||
Currency = SettingField{
|
Currency = SettingField{
|
||||||
reactFieldName: "currency",
|
reactFieldName: "currency",
|
||||||
dBColumnName: "currency",
|
dBColumnName: "currency",
|
||||||
// TODO resolve issue 6 https://github.com/status-im/status-react/pull/13053#issuecomment-1065179963
|
|
||||||
syncProtobufFactory: &SyncProtobufFactory{
|
syncProtobufFactory: &SyncProtobufFactory{
|
||||||
inactive: true, // Remove after issue is resolved
|
|
||||||
fromInterface: currencyProtobufFactory,
|
fromInterface: currencyProtobufFactory,
|
||||||
fromStruct: currencyProtobufFactoryStruct,
|
fromStruct: currencyProtobufFactoryStruct,
|
||||||
valueFromProtobuf: StringFromSyncProtobuf,
|
valueFromProtobuf: StringFromSyncProtobuf,
|
||||||
|
@ -307,9 +305,7 @@ var (
|
||||||
reactFieldName: "stickers/packs-installed",
|
reactFieldName: "stickers/packs-installed",
|
||||||
dBColumnName: "stickers_packs_installed",
|
dBColumnName: "stickers_packs_installed",
|
||||||
valueHandler: JSONBlobHandler,
|
valueHandler: JSONBlobHandler,
|
||||||
// TODO resolve issue 8 https://github.com/status-im/status-react/pull/13053#issuecomment-1065179963
|
|
||||||
syncProtobufFactory: &SyncProtobufFactory{
|
syncProtobufFactory: &SyncProtobufFactory{
|
||||||
inactive: true, // Remove after issue is resolved
|
|
||||||
fromInterface: stickersPacksInstalledProtobufFactory,
|
fromInterface: stickersPacksInstalledProtobufFactory,
|
||||||
fromStruct: stickersPacksInstalledProtobufFactoryStruct,
|
fromStruct: stickersPacksInstalledProtobufFactoryStruct,
|
||||||
valueFromProtobuf: BytesFromSyncProtobuf,
|
valueFromProtobuf: BytesFromSyncProtobuf,
|
||||||
|
|
|
@ -2,6 +2,7 @@ package protocol
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
|
@ -89,6 +90,10 @@ func (m *Messenger) handleSyncSetting(response *MessengerResponse, syncSetting *
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if v, ok := value.([]byte); ok {
|
||||||
|
value = json.RawMessage(v)
|
||||||
|
}
|
||||||
|
|
||||||
response.Settings = append(response.Settings, &settings.SyncSettingField{SettingField: sf, Value: value})
|
response.Settings = append(response.Settings, &settings.SyncSettingField{SettingField: sf, Value: value})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue