mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-12 22:56:55 +00:00
Also - added debugging test for `checkRecentHistory` from the attempt to use transactions to restore balance - small improvements that might clarify better the issues reported about running under linux issues (didn't test them) - fix issues found while reviewing the code. - add support for custom infura token to be used in development Updates #7662
23 lines
493 B
C++
23 lines
493 B
C++
#include "StatusGoEvent.h"
|
|
|
|
namespace Status::StatusGo
|
|
{
|
|
|
|
constexpr auto statusGoEventErrorKey = "error";
|
|
|
|
void to_json(json& j, const StatusGoEvent& d)
|
|
{
|
|
j = {{"type", d.type}, {"event", d.event}};
|
|
|
|
if(d.error != std::nullopt) j[statusGoEventErrorKey] = d.error.value();
|
|
}
|
|
|
|
void from_json(const json& j, StatusGoEvent& d)
|
|
{
|
|
j.at("type").get_to(d.type);
|
|
j.at("event").get_to(d.event);
|
|
|
|
if(j.contains(statusGoEventErrorKey)) j.at(statusGoEventErrorKey).get_to(d.error);
|
|
}
|
|
|
|
} |