mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 11:39:25 +00:00
ledger: show reconnect dialog if ledger is locked during sync
Some checks failed
ci/gh-actions/guix / cache-sources (push) Has been cancelled
ci/gh-actions/build / build-ubuntu-without-scanner (push) Has been cancelled
ci/gh-actions/guix / aarch64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / arm-linux-gnueabihf (push) Has been cancelled
ci/gh-actions/guix / arm64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / riscv64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu.no-tor-bundle (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu.pack (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-w64-mingw32.installer (push) Has been cancelled
ci/gh-actions/guix / x86_64-w64-mingw32 (push) Has been cancelled
ci/gh-actions/guix / bundle-logs (push) Has been cancelled
Some checks failed
ci/gh-actions/guix / cache-sources (push) Has been cancelled
ci/gh-actions/build / build-ubuntu-without-scanner (push) Has been cancelled
ci/gh-actions/guix / aarch64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / arm-linux-gnueabihf (push) Has been cancelled
ci/gh-actions/guix / arm64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / riscv64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu.no-tor-bundle (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu.pack (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-w64-mingw32.installer (push) Has been cancelled
ci/gh-actions/guix / x86_64-w64-mingw32 (push) Has been cancelled
ci/gh-actions/guix / bundle-logs (push) Has been cancelled
This commit is contained in:
parent
1e3bc6615c
commit
f423059b30
10 changed files with 19 additions and 13 deletions
2
monero
2
monero
|
@ -1 +1 @@
|
||||||
Subproject commit 665c304735b68b2a6e55ed8a5efadbeb60056248
|
Subproject commit f10ad631fe7a35fc0c00e9706ae57b8d8eb8f30d
|
|
@ -1431,7 +1431,7 @@ void MainWindow::importTransaction() {
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onDeviceError(const QString &error) {
|
void MainWindow::onDeviceError(const QString &error, quint64 errorCode) {
|
||||||
qCritical() << "Device error: " << error;
|
qCritical() << "Device error: " << error;
|
||||||
|
|
||||||
if (m_showDeviceError) {
|
if (m_showDeviceError) {
|
||||||
|
@ -1441,7 +1441,13 @@ void MainWindow::onDeviceError(const QString &error) {
|
||||||
m_statusBtnHwDevice->setIcon(this->hardwareDeviceUnpairedIcon());
|
m_statusBtnHwDevice->setIcon(this->hardwareDeviceUnpairedIcon());
|
||||||
while (true) {
|
while (true) {
|
||||||
m_showDeviceError = true;
|
m_showDeviceError = true;
|
||||||
auto result = QMessageBox::question(this, "Hardware device", "Lost connection to hardware device. Attempt to reconnect?");
|
|
||||||
|
QString prompt = "Lost connection to hardware device. Attempt to reconnect?";
|
||||||
|
if (errorCode == 0x5515) {
|
||||||
|
prompt = QString("Device must be unlocked to continue scanning. Attempt to continue?");
|
||||||
|
}
|
||||||
|
|
||||||
|
auto result = QMessageBox::question(this, "Hardware device", prompt);
|
||||||
if (result == QMessageBox::Yes) {
|
if (result == QMessageBox::Yes) {
|
||||||
bool r = m_wallet->reconnectDevice();
|
bool r = m_wallet->reconnectDevice();
|
||||||
if (r) {
|
if (r) {
|
||||||
|
|
|
@ -161,7 +161,7 @@ private slots:
|
||||||
void onResendTransaction(const QString &txid);
|
void onResendTransaction(const QString &txid);
|
||||||
void importContacts();
|
void importContacts();
|
||||||
void importTransaction();
|
void importTransaction();
|
||||||
void onDeviceError(const QString &error);
|
void onDeviceError(const QString &error, quint64 errorCode);
|
||||||
void onDeviceButtonRequest(quint64 code);
|
void onDeviceButtonRequest(quint64 code);
|
||||||
void onDeviceButtonPressed();
|
void onDeviceButtonPressed();
|
||||||
void onWalletPassphraseNeeded(bool on_device);
|
void onWalletPassphraseNeeded(bool on_device);
|
||||||
|
|
|
@ -608,7 +608,7 @@ void WindowManager::onDeviceButtonPressed() {
|
||||||
m_splashDialog->hide();
|
m_splashDialog->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::onDeviceError(const QString &errorMessage) {
|
void WindowManager::onDeviceError(const QString &errorMessage, quint64 errorCode) {
|
||||||
// TODO: when does this get called?
|
// TODO: when does this get called?
|
||||||
qCritical() << Q_FUNC_INFO << errorMessage;
|
qCritical() << Q_FUNC_INFO << errorMessage;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ private slots:
|
||||||
void onInitialNetworkConfigured();
|
void onInitialNetworkConfigured();
|
||||||
void onDeviceButtonRequest(quint64 code);
|
void onDeviceButtonRequest(quint64 code);
|
||||||
void onDeviceButtonPressed();
|
void onDeviceButtonPressed();
|
||||||
void onDeviceError(const QString &errorMessage);
|
void onDeviceError(const QString &errorMessage, quint64 errorCode);
|
||||||
void onWalletPassphraseNeeded(bool on_device);
|
void onWalletPassphraseNeeded(bool on_device);
|
||||||
void onChangeTheme(const QString &themeName);
|
void onChangeTheme(const QString &themeName);
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,7 @@ signals:
|
||||||
void walletCreationHeightChanged();
|
void walletCreationHeightChanged();
|
||||||
void deviceButtonRequest(quint64 buttonCode);
|
void deviceButtonRequest(quint64 buttonCode);
|
||||||
void deviceButtonPressed();
|
void deviceButtonPressed();
|
||||||
void deviceError(const QString &message);
|
void deviceError(const QString &message, quint64 errorCode);
|
||||||
void walletPassphraseNeeded(bool onDevice);
|
void walletPassphraseNeeded(bool onDevice);
|
||||||
void beginCommitTransaction();
|
void beginCommitTransaction();
|
||||||
void transactionCommitted(bool status, PendingTransaction *t, const QStringList& txid, const QMap<QString, QString> &txHexMap);
|
void transactionCommitted(bool status, PendingTransaction *t, const QStringList& txid, const QMap<QString, QString> &txHexMap);
|
||||||
|
|
|
@ -73,10 +73,10 @@ void WalletListenerImpl::onDeviceButtonPressed()
|
||||||
emit m_wallet->deviceButtonPressed();
|
emit m_wallet->deviceButtonPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletListenerImpl::onDeviceError(const std::string &message)
|
void WalletListenerImpl::onDeviceError(const std::string &message, unsigned int error_code)
|
||||||
{
|
{
|
||||||
qDebug() << __FUNCTION__;
|
qDebug() << __FUNCTION__;
|
||||||
emit m_wallet->deviceError(QString::fromStdString(message));
|
emit m_wallet->deviceError(QString::fromStdString(message), error_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletListenerImpl::onPassphraseEntered(const QString &passphrase, bool enter_on_device, bool entry_abort)
|
void WalletListenerImpl::onPassphraseEntered(const QString &passphrase, bool enter_on_device, bool entry_abort)
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
|
|
||||||
virtual void onDeviceButtonPressed() override;
|
virtual void onDeviceButtonPressed() override;
|
||||||
|
|
||||||
virtual void onDeviceError(const std::string &message) override;
|
virtual void onDeviceError(const std::string &message, unsigned int error_code) override;
|
||||||
|
|
||||||
virtual void onPassphraseEntered(const QString &passphrase, bool enter_on_device, bool entry_abort) override;
|
virtual void onPassphraseEntered(const QString &passphrase, bool enter_on_device, bool entry_abort) override;
|
||||||
|
|
||||||
|
|
|
@ -43,10 +43,10 @@ public:
|
||||||
emit m_mgr->deviceButtonPressed();
|
emit m_mgr->deviceButtonPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void onDeviceError(const std::string &message) override
|
void onDeviceError(const std::string &message, unsigned int error_code) override
|
||||||
{
|
{
|
||||||
qDebug() << __FUNCTION__;
|
qDebug() << __FUNCTION__;
|
||||||
emit m_mgr->deviceError(QString::fromStdString(message));
|
emit m_mgr->deviceError(QString::fromStdString(message), error_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -121,7 +121,7 @@ signals:
|
||||||
void walletPassphraseNeeded(bool onDevice);
|
void walletPassphraseNeeded(bool onDevice);
|
||||||
void deviceButtonRequest(quint64 buttonCode);
|
void deviceButtonRequest(quint64 buttonCode);
|
||||||
void deviceButtonPressed();
|
void deviceButtonPressed();
|
||||||
void deviceError(const QString &message);
|
void deviceError(const QString &message, quint64 errorCode);
|
||||||
void openAliasResolved(const QString &alias, const QString &address, bool dnssecValid);
|
void openAliasResolved(const QString &alias, const QString &address, bool dnssecValid);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue