From 87695d4c7d8641192fba4d2b50f1e7269b198567 Mon Sep 17 00:00:00 2001 From: Satoshi Otomakan Date: Tue, 10 Sep 2024 11:06:08 +0200 Subject: [PATCH] feat(ton): Fix C++ address analyzer --- docs/registry.md | 2 +- tests/common/Keystore/StoredKeyTONTests.cpp | 2 +- tests/common/Keystore/StoredKeyTests.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/registry.md b/docs/registry.md index acd061790f2..7606e14a45b 100644 --- a/docs/registry.md +++ b/docs/registry.md @@ -130,7 +130,7 @@ This list is generated from [./registry.json](../registry.json) | 10004689 | IoTeX EVM | IOTX | | | | 10007000 | NativeZetaChain | ZETA | | | | 10007700 | NativeCanto | CANTO | | | -| 10008217 | Kaia | KLAY | | | +| 10008217 | Kaia | KLAY | | | | 10009000 | Avalanche C-Chain | AVAX | | | | 10009001 | Evmos | EVMOS | | | | 10042170 | Arbitrum Nova | ETH | | | diff --git a/tests/common/Keystore/StoredKeyTONTests.cpp b/tests/common/Keystore/StoredKeyTONTests.cpp index 899c077f0ab..6be77a508d3 100644 --- a/tests/common/Keystore/StoredKeyTONTests.cpp +++ b/tests/common/Keystore/StoredKeyTONTests.cpp @@ -154,7 +154,7 @@ TEST(StoredKeyTON, LoadTonMnemonic) { EXPECT_EQ(key.name, "Test TON Account"); const auto data = key.payload.decrypt(gPassword); - const auto mnemonic = string(reinterpret_cast(data.data())); + const auto mnemonic = string(reinterpret_cast(data.data()), data.size()); EXPECT_EQ(mnemonic, gTONMnemonic); EXPECT_EQ(key.accounts[0].coin, TWCoinTypeTON); diff --git a/tests/common/Keystore/StoredKeyTests.cpp b/tests/common/Keystore/StoredKeyTests.cpp index 6377c629d0d..be0925ec396 100644 --- a/tests/common/Keystore/StoredKeyTests.cpp +++ b/tests/common/Keystore/StoredKeyTests.cpp @@ -348,7 +348,7 @@ TEST(StoredKey, LoadLegacyMnemonic) { EXPECT_EQ(key.id, "629aad29-0b22-488e-a0e7-b4219d4f311c"); const auto data = key.payload.decrypt(gPassword); - const auto mnemonic = string(reinterpret_cast(data.data())); + const auto mnemonic = string(reinterpret_cast(data.data()), data.size()); EXPECT_EQ(mnemonic, "ripple scissors kick mammal hire column oak again sun offer wealth tomorrow wagon turn back"); EXPECT_EQ(key.accounts[0].coin, TWCoinTypeEthereum);