We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 655f89f commit 3823392Copy full SHA for 3823392
src/interface/TWStoredKey.cpp
@@ -90,8 +90,8 @@ struct TWStoredKey* _Nullable TWStoredKeyImportHDWalletWithEncryption(TWString*
90
struct TWStoredKey* _Nullable TWStoredKeyImportJSON(TWData* _Nonnull json) {
91
try {
92
const auto& d = *reinterpret_cast<const TW::Data*>(json);
93
- const auto parsed = nlohmann::json::parse(d);
94
- return new TWStoredKey{ KeyStore::StoredKey::createWithJson(nlohmann::json::parse(d)) };
+ const auto parsed = nlohmann::json::parse(std::string(d.begin(), d.end()));
+ return new TWStoredKey{ KeyStore::StoredKey::createWithJson(parsed) };
95
} catch (...) {
96
return nullptr;
97
}
0 commit comments