fix(legacy): Fix testnet account label in GetAddress dialog.

pull/1926/head
Andrew Kozlik 3 years ago committed by Andrew Kozlik
parent 274ccdc4c0
commit f4b8dbefb6

@ -43,6 +43,12 @@ const CoinInfo *coinByAddressType(uint32_t address_type) {
}
const CoinInfo *coinBySlip44(uint32_t coin_type) {
if (coin_type == SLIP44_TESTNET) {
// The slip44 coin type is the same for all testnets, so we return the
// Bitcoin Testnet.
return coinByName("Testnet");
}
for (int i = 0; i < COINS_COUNT; i++) {
if (coin_type == coins[i].coin_type) {
return &(coins[i]);

@ -59,6 +59,12 @@ typedef struct _CoinInfo {
#include "coin_info.h"
// SLIP-44 hardened coin type for Bitcoin
#define SLIP44_BITCOIN 0x80000000
// SLIP-44 hardened coin type for all Testnet coins
#define SLIP44_TESTNET 0x80000001
const CoinInfo *coinByName(const char *name);
const CoinInfo *coinByAddressType(uint32_t address_type);
const CoinInfo *coinBySlip44(uint32_t coin_type);

@ -37,12 +37,6 @@
#define PATH_MAX_CHANGE 1
#define PATH_MAX_ADDRESS_INDEX 1000000
// SLIP-44 hardened coin type for Bitcoin
#define SLIP44_BITCOIN 0x80000000
// SLIP-44 hardened coin type for all Testnet coins
#define SLIP44_TESTNET 0x80000001
uint32_t ser_length(uint32_t len, uint8_t *out) {
if (len < 253) {
out[0] = len & 0xFF;

Loading…
Cancel
Save