|
13 | 13 | #include <gtest/gtest.h>
|
14 | 14 |
|
15 | 15 | namespace TW::Cosmos::tests {
|
16 |
| - TEST(TWTiaCoinType, TWCoinType) { |
17 |
| - const auto coin = TWCoinTypeTia; |
18 |
| - const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin)); |
19 |
| - const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin)); |
20 |
| - const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin)); |
21 |
| - const auto chainId = WRAPS(TWCoinTypeChainId(coin)); |
22 |
| - const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("943B1A59EB724A1258CF167834A83558DE5A31E8C1E31FCBCBB99404222E5FBF")); |
23 |
| - const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); |
24 |
| - const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("celestia142j9u5eaduzd7faumygud6ruhdwme98qpwmfv7")); |
25 |
| - const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); |
26 |
| - assertStringsEqual(id, "tia"); |
27 |
| - assertStringsEqual(name, "Celestia"); |
28 |
| - assertStringsEqual(symbol, "TIA"); |
29 |
| - ASSERT_EQ(TWCoinTypeConfigurationGetDecimals(coin), 6); |
30 |
| - ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainCosmos); |
31 |
| - ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0x0); |
32 |
| - ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0x0); |
33 |
| - assertStringsEqual(chainId, "mocha-4"); |
34 |
| - assertStringsEqual(txUrl, "https://www.mintscan.io/tia/txs/943B1A59EB724A1258CF167834A83558DE5A31E8C1E31FCBCBB99404222E5FBF"); |
35 |
| - assertStringsEqual(accUrl, "https://www.mintscan.io/tia/account/celestia142j9u5eaduzd7faumygud6ruhdwme98qpwmfv7"); |
36 |
| - } |
| 16 | + |
| 17 | +TEST(TWTiaCoinType, TWCoinType) { |
| 18 | + const auto coin = TWCoinTypeTia; |
| 19 | + const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin)); |
| 20 | + const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin)); |
| 21 | + const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin)); |
| 22 | + const auto chainId = WRAPS(TWCoinTypeChainId(coin)); |
| 23 | + const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("FF370C65D8D67B8236F9D3A8D2B1256337C60C1965092CADD1FA970288FCE99B")); |
| 24 | + const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); |
| 25 | + const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("celestia1tt4tv4jrs4twdtzwywxd8u65duxgk8y73wvfu2")); |
| 26 | + const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); |
| 27 | + assertStringsEqual(id, "tia"); |
| 28 | + assertStringsEqual(name, "Celestia"); |
| 29 | + assertStringsEqual(symbol, "TIA"); |
| 30 | + ASSERT_EQ(TWCoinTypeConfigurationGetDecimals(coin), 6); |
| 31 | + ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainCosmos); |
| 32 | + ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0x0); |
| 33 | + ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0x0); |
| 34 | + assertStringsEqual(chainId, "celestia"); |
| 35 | + assertStringsEqual(txUrl, "https://www.mintscan.io/celestia/txs/FF370C65D8D67B8236F9D3A8D2B1256337C60C1965092CADD1FA970288FCE99B"); |
| 36 | + assertStringsEqual(accUrl, "https://www.mintscan.io/celestia/account/celestia1tt4tv4jrs4twdtzwywxd8u65duxgk8y73wvfu2"); |
37 | 37 | }
|
| 38 | + |
| 39 | +} // namespace TW::Cosmos::tests |
0 commit comments