Skip to content

Commit

Permalink
Merge branch 'dev' into ledger-speculos
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-tucci authored Jun 14, 2023
2 parents e492eb4 + 95877a1 commit 169e797
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
32 changes: 29 additions & 3 deletions src/device/device_ledger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,35 @@ unsigned int device_ledger::exchange_wait_on_input(unsigned int ok, unsigned int
return true;
}

static const std::vector<io::hid_conn_params> known_devices {
{0x2c97, 0x1000, 0, 0xffa0},
{0x2c97, 0x4000, 0, 0xffa0},
static const std::vector<hw::io::hid_conn_params> known_devices {
// Nano S
{0x2c97, 0x1000, 0, 0xffa0}, {0x2c97, 0x1001, 0, 0xffa0}, {0x2c97, 0x1002, 0, 0xffa0}, {0x2c97, 0x1003, 0, 0xffa0},
{0x2c97, 0x1004, 0, 0xffa0}, {0x2c97, 0x1005, 0, 0xffa0}, {0x2c97, 0x1006, 0, 0xffa0}, {0x2c97, 0x1007, 0, 0xffa0},
{0x2c97, 0x1008, 0, 0xffa0}, {0x2c97, 0x1009, 0, 0xffa0}, {0x2c97, 0x100a, 0, 0xffa0}, {0x2c97, 0x100b, 0, 0xffa0},
{0x2c97, 0x100c, 0, 0xffa0}, {0x2c97, 0x100d, 0, 0xffa0}, {0x2c97, 0x100e, 0, 0xffa0}, {0x2c97, 0x100f, 0, 0xffa0},
{0x2c97, 0x1010, 0, 0xffa0}, {0x2c97, 0x1011, 0, 0xffa0}, {0x2c97, 0x1012, 0, 0xffa0}, {0x2c97, 0x1013, 0, 0xffa0},
{0x2c97, 0x1014, 0, 0xffa0}, {0x2c97, 0x1015, 0, 0xffa0}, {0x2c97, 0x1016, 0, 0xffa0}, {0x2c97, 0x1017, 0, 0xffa0},
{0x2c97, 0x1018, 0, 0xffa0}, {0x2c97, 0x1019, 0, 0xffa0}, {0x2c97, 0x101a, 0, 0xffa0}, {0x2c97, 0x101b, 0, 0xffa0},
{0x2c97, 0x101c, 0, 0xffa0}, {0x2c97, 0x101d, 0, 0xffa0}, {0x2c97, 0x101e, 0, 0xffa0}, {0x2c97, 0x101f, 0, 0xffa0},
{0x2c97, 0x1005, 0, 0xffa0},
// Nano X
{0x2c97, 0x4000, 0, 0xffa0}, {0x2c97, 0x4001, 0, 0xffa0}, {0x2c97, 0x4002, 0, 0xffa0}, {0x2c97, 0x4003, 0, 0xffa0},
{0x2c97, 0x4004, 0, 0xffa0}, {0x2c97, 0x4005, 0, 0xffa0}, {0x2c97, 0x4006, 0, 0xffa0}, {0x2c97, 0x4007, 0, 0xffa0},
{0x2c97, 0x4008, 0, 0xffa0}, {0x2c97, 0x4009, 0, 0xffa0}, {0x2c97, 0x400a, 0, 0xffa0}, {0x2c97, 0x400b, 0, 0xffa0},
{0x2c97, 0x400c, 0, 0xffa0}, {0x2c97, 0x400d, 0, 0xffa0}, {0x2c97, 0x400e, 0, 0xffa0}, {0x2c97, 0x400f, 0, 0xffa0},
{0x2c97, 0x4010, 0, 0xffa0}, {0x2c97, 0x4011, 0, 0xffa0}, {0x2c97, 0x4012, 0, 0xffa0}, {0x2c97, 0x4013, 0, 0xffa0},
{0x2c97, 0x4014, 0, 0xffa0}, {0x2c97, 0x4015, 0, 0xffa0}, {0x2c97, 0x4016, 0, 0xffa0}, {0x2c97, 0x4017, 0, 0xffa0},
{0x2c97, 0x4018, 0, 0xffa0}, {0x2c97, 0x4019, 0, 0xffa0}, {0x2c97, 0x401a, 0, 0xffa0}, {0x2c97, 0x401b, 0, 0xffa0},
{0x2c97, 0x401c, 0, 0xffa0}, {0x2c97, 0x401d, 0, 0xffa0}, {0x2c97, 0x401e, 0, 0xffa0}, {0x2c97, 0x401f, 0, 0xffa0},
// Nano S Plus
{0x2c97, 0x5000, 0, 0xffa0}, {0x2c97, 0x5001, 0, 0xffa0}, {0x2c97, 0x5002, 0, 0xffa0}, {0x2c97, 0x5003, 0, 0xffa0},
{0x2c97, 0x5004, 0, 0xffa0}, {0x2c97, 0x5005, 0, 0xffa0}, {0x2c97, 0x5006, 0, 0xffa0}, {0x2c97, 0x5007, 0, 0xffa0},
{0x2c97, 0x5008, 0, 0xffa0}, {0x2c97, 0x5009, 0, 0xffa0}, {0x2c97, 0x500a, 0, 0xffa0}, {0x2c97, 0x500b, 0, 0xffa0},
{0x2c97, 0x500c, 0, 0xffa0}, {0x2c97, 0x500d, 0, 0xffa0}, {0x2c97, 0x500e, 0, 0xffa0}, {0x2c97, 0x500f, 0, 0xffa0},
{0x2c97, 0x5010, 0, 0xffa0}, {0x2c97, 0x5011, 0, 0xffa0}, {0x2c97, 0x5012, 0, 0xffa0}, {0x2c97, 0x5013, 0, 0xffa0},
{0x2c97, 0x5014, 0, 0xffa0}, {0x2c97, 0x5015, 0, 0xffa0}, {0x2c97, 0x5016, 0, 0xffa0}, {0x2c97, 0x5017, 0, 0xffa0},
{0x2c97, 0x5018, 0, 0xffa0}, {0x2c97, 0x5019, 0, 0xffa0}, {0x2c97, 0x501a, 0, 0xffa0}, {0x2c97, 0x501b, 0, 0xffa0},
{0x2c97, 0x501c, 0, 0xffa0}, {0x2c97, 0x501d, 0, 0xffa0}, {0x2c97, 0x501e, 0, 0xffa0}, {0x2c97, 0x501f, 0, 0xffa0},
};

bool device_ledger::connect() {
Expand Down
10 changes: 9 additions & 1 deletion src/simplewallet/simplewallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6292,7 +6292,15 @@ bool simple_wallet::query_locked_stakes(bool print_result, bool print_key_images
{
msg_buf.append(fmt::format("Unlock Height :{}\n",std::to_string(node_info.requested_unlock_height)));
}
msg_buf.append(fmt::format("Operator's Contribution :{} of {} BDX required\n",cryptonote::print_money(contributor.amount),required));
std::string walletaddress = m_wallet->get_account().get_public_address_str(m_wallet->nettype());
if(walletaddress == contributor.address)
{
msg_buf.append(fmt::format("Operator's Contribution :{} of {} BDX required\n",cryptonote::print_money(contributor.amount),required));
}
else
{
msg_buf.append(fmt::format("Operator's Contribution :{} of {} BDX required ({})\n",cryptonote::print_money(contributor.amount),required,contributor.address));
}
printed_addresses.insert(contributor.address);
}
if(!only_once && printed_addresses.find(contributor.address) == printed_addresses.end())
Expand Down

0 comments on commit 169e797

Please sign in to comment.