Skip to content

Commit 3823392

Browse files
authored
Remove deprecated code and fix build issue in newer compiler (trustwallet#4380)
See llvm/llvm-project@e30a148
1 parent 655f89f commit 3823392

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interface/TWStoredKey.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ struct TWStoredKey* _Nullable TWStoredKeyImportHDWalletWithEncryption(TWString*
9090
struct TWStoredKey* _Nullable TWStoredKeyImportJSON(TWData* _Nonnull json) {
9191
try {
9292
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)) };
93+
const auto parsed = nlohmann::json::parse(std::string(d.begin(), d.end()));
94+
return new TWStoredKey{ KeyStore::StoredKey::createWithJson(parsed) };
9595
} catch (...) {
9696
return nullptr;
9797
}

0 commit comments

Comments
 (0)