mirror of
				https://git.wownero.com/wowlet/wowlet.git
				synced 2024-08-15 01:03:14 +00:00 
			
		
		
		
	Merge pull request 'Xmr.to: disable tor checkbox on Tails and Whonix' (#43) from tobtoht/feather:xmrto_tails_tor into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/43
This commit is contained in:
		
						commit
						9c139e40d3
					
				
					 2 changed files with 7 additions and 6 deletions
				
			
		| 
						 | 
					@ -15,6 +15,7 @@ XMRToWidget::XMRToWidget(QWidget *parent) :
 | 
				
			||||||
        ui(new Ui::XMRToWidget)
 | 
					        ui(new Ui::XMRToWidget)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    ui->setupUi(this);
 | 
					    ui->setupUi(this);
 | 
				
			||||||
 | 
					    m_ctx = MainWindow::getContext();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QString amount_rx = R"(^\d*\.\d*$)";
 | 
					    QString amount_rx = R"(^\d*\.\d*$)";
 | 
				
			||||||
    QRegExp rx;
 | 
					    QRegExp rx;
 | 
				
			||||||
| 
						 | 
					@ -62,6 +63,10 @@ XMRToWidget::XMRToWidget(QWidget *parent) :
 | 
				
			||||||
            m_contextMenu->popup(ui->historyTable->viewport()->mapToGlobal(point));
 | 
					            m_contextMenu->popup(ui->historyTable->viewport()->mapToGlobal(point));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (m_ctx->isTails || m_ctx->isWhonix) {
 | 
				
			||||||
 | 
					        ui->torCheckBox->setDisabled(true);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void XMRToWidget::setHistoryModel(XmrToModel *model) {
 | 
					void XMRToWidget::setHistoryModel(XmrToModel *model) {
 | 
				
			||||||
| 
						 | 
					@ -81,8 +86,6 @@ void XMRToWidget::onWalletClosed() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void XMRToWidget::onCreateOrder() {
 | 
					void XMRToWidget::onCreateOrder() {
 | 
				
			||||||
    // @TODO: regex verify
 | 
					    // @TODO: regex verify
 | 
				
			||||||
    if(m_ctx == nullptr)
 | 
					 | 
				
			||||||
        this->m_ctx = MainWindow::getContext();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    auto amount = ui->lineAmount->text();
 | 
					    auto amount = ui->lineAmount->text();
 | 
				
			||||||
    if(amount.isEmpty()) {
 | 
					    if(amount.isEmpty()) {
 | 
				
			||||||
| 
						 | 
					@ -123,9 +126,6 @@ void XMRToWidget::onTorCheckBoxToggled(int state) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void XMRToWidget::updateConversionLabel() {
 | 
					void XMRToWidget::updateConversionLabel() {
 | 
				
			||||||
    if(m_ctx == nullptr)
 | 
					 | 
				
			||||||
        this->m_ctx = MainWindow::getContext();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    QString amount = ui->lineAmount->text();
 | 
					    QString amount = ui->lineAmount->text();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int curIndex = ui->comboBox_currency->currentIndex();
 | 
					    int curIndex = ui->comboBox_currency->currentIndex();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -51,7 +51,8 @@ private:
 | 
				
			||||||
    Ui::XMRToWidget *ui;
 | 
					    Ui::XMRToWidget *ui;
 | 
				
			||||||
    AppContext *m_ctx;
 | 
					    AppContext *m_ctx;
 | 
				
			||||||
    bool m_ratesDisplayed = false;
 | 
					    bool m_ratesDisplayed = false;
 | 
				
			||||||
    const QString m_regionBlockMessage = "Beware that XMR.To region blocks certain IPs, which can be problematic in combination with Tor. Use the clearnet option if this is a problem.";
 | 
					    const QString m_regionBlockMessage = "Beware that XMR.To region blocks certain IPs, which can be problematic in combination with Tor. "
 | 
				
			||||||
 | 
					                                         "Wait a few minutes for the circuit to switch, or disable the option to relay over Tor if the problem persists.";
 | 
				
			||||||
    double m_unlockedBalance = 0;
 | 
					    double m_unlockedBalance = 0;
 | 
				
			||||||
    XmrToModel *tableModel;
 | 
					    XmrToModel *tableModel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue