|
| 1 | +// SPDX-License-Identifier: Apache-2.0 |
| 2 | +// |
| 3 | +// Copyright © 2017 Trust Wallet. |
| 4 | +// |
| 5 | +// This is a GENERATED FILE, changes made here MAY BE LOST. |
| 6 | +// Generated one-time (codegen/bin/cointests) |
| 7 | +// |
| 8 | + |
| 9 | +#include "TestUtilities.h" |
| 10 | +#include <TrustWalletCore/TWCoinTypeConfiguration.h> |
| 11 | +#include <gtest/gtest.h> |
| 12 | + |
| 13 | + |
| 14 | +TEST(TWVinuChainCoinType, TWCoinType) { |
| 15 | + const auto coin = TWCoinTypeVinuChain; |
| 16 | + const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin)); |
| 17 | + const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin)); |
| 18 | + const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin)); |
| 19 | + const auto chainId = WRAPS(TWCoinTypeChainId(coin)); |
| 20 | + const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0xb0a741d882291951de1fac72e90b9baf886ddb0c9c87658a0c206490dfaa5202")); |
| 21 | + const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); |
| 22 | + const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0x9474feb9917b87da6f0d830ba66ee0035835c0d3")); |
| 23 | + const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); |
| 24 | + |
| 25 | + assertStringsEqual(id, "vinuchain"); |
| 26 | + assertStringsEqual(name, "VinuChain"); |
| 27 | + assertStringsEqual(symbol, "VC"); |
| 28 | + ASSERT_EQ(TWCoinTypeConfigurationGetDecimals(coin), 18); |
| 29 | + ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainEthereum); |
| 30 | + ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0x0); |
| 31 | + ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0x0); |
| 32 | + assertStringsEqual(chainId, "207"); |
| 33 | + assertStringsEqual(txUrl, "https://vinuexplorer.org/tx/0xb0a741d882291951de1fac72e90b9baf886ddb0c9c87658a0c206490dfaa5202"); |
| 34 | + assertStringsEqual(accUrl, "https://vinuexplorer.org/address/0x9474feb9917b87da6f0d830ba66ee0035835c0d3"); |
| 35 | +} |
0 commit comments