mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-29 19:08:12 +00:00
fix typo
This commit is contained in:
parent
956d5e7149
commit
6b31ac9753
@ -17,19 +17,17 @@
|
|||||||
|
|
||||||
from .common import *
|
from .common import *
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
from trezorlib.tx_api import TxApiInsight
|
from trezorlib.tx_api import TxApiBcash
|
||||||
from trezorlib.ckd_public import deserialize
|
from trezorlib.ckd_public import deserialize
|
||||||
from trezorlib.client import CallException
|
from trezorlib.client import CallException
|
||||||
|
|
||||||
TxApiBitcoinCash = TxApiInsight(network='insight_bch', url='https://bch-bitcore2.trezor.io/api/')
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip_t2
|
@pytest.mark.skip_t2
|
||||||
class TestMsgSigntxBch(TrezorTest):
|
class TestMsgSigntxBch(TrezorTest):
|
||||||
|
|
||||||
def test_send_bch_change(self):
|
def test_send_bch_change(self):
|
||||||
self.setup_mnemonic_allallall()
|
self.setup_mnemonic_allallall()
|
||||||
self.client.set_tx_api(TxApiBitcoinCash)
|
self.client.set_tx_api(TxApiBcash)
|
||||||
inp1 = proto.TxInputType(
|
inp1 = proto.TxInputType(
|
||||||
address_n=self.client.expand_path("44'/145'/0'/0/0"),
|
address_n=self.client.expand_path("44'/145'/0'/0/0"),
|
||||||
# 1MH9KKcvdCTY44xVDC2k3fjBbX5Cz29N1q
|
# 1MH9KKcvdCTY44xVDC2k3fjBbX5Cz29N1q
|
||||||
@ -66,7 +64,7 @@ class TestMsgSigntxBch(TrezorTest):
|
|||||||
|
|
||||||
def test_send_bch_nochange(self):
|
def test_send_bch_nochange(self):
|
||||||
self.setup_mnemonic_allallall()
|
self.setup_mnemonic_allallall()
|
||||||
self.client.set_tx_api(TxApiBitcoinCash)
|
self.client.set_tx_api(TxApiBcash)
|
||||||
inp1 = proto.TxInputType(
|
inp1 = proto.TxInputType(
|
||||||
address_n=self.client.expand_path("44'/145'/0'/1/0"),
|
address_n=self.client.expand_path("44'/145'/0'/1/0"),
|
||||||
# 1HADRPJpgqBzThepERpVXNi6qRgiLQRNoE
|
# 1HADRPJpgqBzThepERpVXNi6qRgiLQRNoE
|
||||||
@ -106,7 +104,7 @@ class TestMsgSigntxBch(TrezorTest):
|
|||||||
|
|
||||||
def test_attack_amount(self):
|
def test_attack_amount(self):
|
||||||
self.setup_mnemonic_allallall()
|
self.setup_mnemonic_allallall()
|
||||||
self.client.set_tx_api(TxApiBitcoinCash)
|
self.client.set_tx_api(TxApiBcash)
|
||||||
inp1 = proto.TxInputType(
|
inp1 = proto.TxInputType(
|
||||||
address_n=self.client.expand_path("44'/145'/0'/1/0"),
|
address_n=self.client.expand_path("44'/145'/0'/1/0"),
|
||||||
# 1HADRPJpgqBzThepERpVXNi6qRgiLQRNoE
|
# 1HADRPJpgqBzThepERpVXNi6qRgiLQRNoE
|
||||||
@ -167,7 +165,7 @@ class TestMsgSigntxBch(TrezorTest):
|
|||||||
|
|
||||||
def test_attack_change_input(self):
|
def test_attack_change_input(self):
|
||||||
self.setup_mnemonic_allallall()
|
self.setup_mnemonic_allallall()
|
||||||
self.client.set_tx_api(TxApiBitcoinCash)
|
self.client.set_tx_api(TxApiBcash)
|
||||||
inp1 = proto.TxInputType(
|
inp1 = proto.TxInputType(
|
||||||
address_n=self.client.expand_path("44'/145'/1000'/0/0"),
|
address_n=self.client.expand_path("44'/145'/1000'/0/0"),
|
||||||
# 1MH9KKcvdCTY44xVDC2k3fjBbX5Cz29N1q
|
# 1MH9KKcvdCTY44xVDC2k3fjBbX5Cz29N1q
|
||||||
@ -222,7 +220,7 @@ class TestMsgSigntxBch(TrezorTest):
|
|||||||
|
|
||||||
def test_send_bch_multisig_wrongchange(self):
|
def test_send_bch_multisig_wrongchange(self):
|
||||||
self.setup_mnemonic_allallall()
|
self.setup_mnemonic_allallall()
|
||||||
self.client.set_tx_api(TxApiBitcoinCash)
|
self.client.set_tx_api(TxApiBcash)
|
||||||
xpubs = []
|
xpubs = []
|
||||||
for n in map(lambda index: self.client.get_public_node(self.client.expand_path("44'/145'/" + str(index) + "'")), range(1, 4)):
|
for n in map(lambda index: self.client.get_public_node(self.client.expand_path("44'/145'/" + str(index) + "'")), range(1, 4)):
|
||||||
xpubs.append(n.xpub)
|
xpubs.append(n.xpub)
|
||||||
@ -275,7 +273,7 @@ class TestMsgSigntxBch(TrezorTest):
|
|||||||
|
|
||||||
def test_send_bch_multisig_change(self):
|
def test_send_bch_multisig_change(self):
|
||||||
self.setup_mnemonic_allallall()
|
self.setup_mnemonic_allallall()
|
||||||
self.client.set_tx_api(TxApiBitcoinCash)
|
self.client.set_tx_api(TxApiBcash)
|
||||||
xpubs = []
|
xpubs = []
|
||||||
for n in map(lambda index: self.client.get_public_node(self.client.expand_path("44'/145'/" + str(index) + "'")), range(1, 4)):
|
for n in map(lambda index: self.client.get_public_node(self.client.expand_path("44'/145'/" + str(index) + "'")), range(1, 4)):
|
||||||
xpubs.append(n.xpub)
|
xpubs.append(n.xpub)
|
@ -183,9 +183,7 @@ TxApiTestnet = TxApiInsight(network='insight_testnet', url='https://testnet-bitc
|
|||||||
TxApiLitecoin = TxApiInsight(network='insight_litecoin', url='https://ltc-bitcore1.trezor.io/api/')
|
TxApiLitecoin = TxApiInsight(network='insight_litecoin', url='https://ltc-bitcore1.trezor.io/api/')
|
||||||
TxApiDash = TxApiInsight(network='insight_dash', url='https://dash-bitcore1.trezor.io/api/')
|
TxApiDash = TxApiInsight(network='insight_dash', url='https://dash-bitcore1.trezor.io/api/')
|
||||||
TxApiZcash = TxApiInsight(network='insight_zcash', url='https://zec-bitcore1.trezor.io/api/', zcash=True)
|
TxApiZcash = TxApiInsight(network='insight_zcash', url='https://zec-bitcore1.trezor.io/api/', zcash=True)
|
||||||
TxApiBcash = TxApiInsight(network='insight_zcash', url='https://bch-bitcore2.trezor.io/api/')
|
TxApiBcash = TxApiInsight(network='insight_bcash', url='https://bch-bitcore2.trezor.io/api/')
|
||||||
TxApiDecredTestnet = TxApiInsight(network='insight_decred_testnet', url='https://testnet.decred.org/api/')
|
TxApiDecredTestnet = TxApiInsight(network='insight_decred_testnet', url='https://testnet.decred.org/api/')
|
||||||
|
|
||||||
TxApiDogecoin = TxApiBlockCypher(network='blockcypher_dogecoin', url='http://api.blockcypher.com/v1/doge/main/')
|
TxApiDogecoin = TxApiBlockCypher(network='blockcypher_dogecoin', url='http://api.blockcypher.com/v1/doge/main/')
|
||||||
|
|
||||||
TxApiSegnet = TxApiSmartbit(network='smartbit_segnet', url='https://segnet-api.smartbit.com.au/v1/blockchain/')
|
TxApiSegnet = TxApiSmartbit(network='smartbit_segnet', url='https://segnet-api.smartbit.com.au/v1/blockchain/')
|
||||||
|
Loading…
Reference in New Issue
Block a user