@ -107,7 +107,7 @@ MainWindow::MainWindow(QWidget *parent) :
QObject : : connect ( ui - > actionExit , & QAction : : triggered , this , & MainWindow : : close ) ;
QObject : : connect ( ui - > actionExit , & QAction : : triggered , this , & MainWindow : : close ) ;
// Set up Feedback action
// Set up Feedback action
QObject : : connect ( ui - > actionDonate , & QAction : : triggered , this , & MainWindow : : donate ) ;
//QObject::connect(ui->actionDonate, &QAction::triggered, this, &MainWindow::donate);
QObject : : connect ( ui - > actionTelegram , & QAction : : triggered , this , & MainWindow : : telegram ) ;
QObject : : connect ( ui - > actionTelegram , & QAction : : triggered , this , & MainWindow : : telegram ) ;
@ -840,7 +840,7 @@ void MainWindow::setupSettingsModal() {
// List of default servers
// List of default servers
settings . cmbServer - > addItem ( " https://lite.hush.is " ) ;
settings . cmbServer - > addItem ( " https://lite.hush.is " ) ;
settings . cmbServer - > addItem ( " https://bies.xyz " ) ;
settings . cmbServer - > addItem ( " https://lite.hush.community " ) ;
settings . cmbServer - > addItem ( " https://devo.crabdance.com " ) ;
settings . cmbServer - > addItem ( " https://devo.crabdance.com " ) ;
//settings.cmbServer->addItem("https://hush.leto.net:5420");
//settings.cmbServer->addItem("https://hush.leto.net:5420");
//TODO: seperate lists of https/Tor servers, only show user or attempt
//TODO: seperate lists of https/Tor servers, only show user or attempt
@ -909,14 +909,11 @@ void MainWindow::website() {
void MainWindow : : donate ( ) {
void MainWindow : : donate ( ) {
// Set up a donation to me :)
ui - > Address1 - > setText ( Settings : : getDonationAddr ( ) ) ;
ui - > Address1 - > setText ( Settings : : getDonationAddr ( ) ) ;
ui - > Address1 - > setCursorPosition ( 0 ) ;
ui - > Address1 - > setCursorPosition ( 0 ) ;
ui - > Amount1 - > setText ( " 0.00 " ) ;
ui - > Amount1 - > setText ( " 0.00 " ) ;
ui - > MemoTxt1 - > setText ( tr ( " Some feedback about SilentDragonlite or Hush... " ) ) ;
ui - > MemoTxt1 - > setText ( tr ( " Some feedback about SilentDragonlite or Hush... " ) ) ;
ui - > statusBar - > showMessage ( tr ( " Send some private and shielded feedback about " ) % Settings : : getTokenName ( ) % tr ( " or SilentDragonLite " ) ) ;
ui - > statusBar - > showMessage ( tr ( " Send DenioD some private and shielded feedback about " ) % Settings : : getTokenName ( ) % tr ( " or SilentDragonLite " ) ) ;
// And switch to the send tab.
// And switch to the send tab.
ui - > tabWidget - > setCurrentIndex ( 1 ) ;
ui - > tabWidget - > setCurrentIndex ( 1 ) ;
@ -930,30 +927,37 @@ void MainWindow::donate() {
if ( keys - > isEmpty ( ) ) {
if ( keys - > isEmpty ( ) ) {
delete keys ;
delete keys ;
ui - > statusBar - > showMessage ( tr ( " Private key import rescan in progress. Your funds will be automaticly shield to a wallet seed zaddr . This will take some time " ) ) ;
ui - > statusBar - > showMessage ( tr ( " Private key import rescan in progress. Your funds will be shielded into this wallet and backed up by your seed phrase . This will take some time " ) ) ;
return ;
return ;
}
}
// Pop the first key
// Pop the first key
QString key = keys - > first ( ) ;
QString key = keys - > first ( ) ;
QString key1 = key + QString ( " " ) + QString ( " 0 " ) ;
QString key1 = key + QString ( " " ) + QString ( " 0 " ) ;
keys - > pop_front ( ) ;
keys - > pop_front ( ) ;
bool rescan = keys - > isEmpty ( ) ;
bool rescan = keys - > isEmpty ( ) ;
if ( key . startsWith ( " SK " ) | | key . startsWith ( " secret " ) ) {
if ( key . startsWith ( " SK " ) | |
key . startsWith ( " secret " ) ) {
rpc - > importZPrivKey ( key , [ = ] ( auto ) { this - > doImport ( keys ) ; } ) ;
rpc - > importZPrivKey ( key , [ = ] ( auto ) { this - > doImport ( keys ) ; } ) ;
} else if ( key . startsWith ( " U " ) | | key . startsWith ( " 5 " ) | | key . startsWith ( " L " ) | | key . startsWith ( " K " ) ) {
// 5 = uncompressed, len=51
// LK= compressed, len=52
// TODO: verify exact length of (un)compressed
if ( key . length ( ) > 52 ) {
QMessageBox : : critical ( this , tr ( " Wrong Private key format " ) ,
tr ( " That private key is too long. It should be 51 or 52 characters. " ) + " \n " ) ;
return ;
}
} else if ( key . startsWith ( " U " ) ) {
if ( key . length ( ) < 51 ) {
QMessageBox : : critical ( this , tr ( " Wrong Private key format " ) ,
tr ( " That private key is too short. It should be 51 or 52 characters. " ) + " \n " ) ;
return ;
}
rpc - > importTPrivKey ( key , [ = ] ( auto ) { this - > doImport ( keys ) ; } ) ;
rpc - > importTPrivKey ( key , [ = ] ( auto ) { this - > doImport ( keys ) ; } ) ;
} else {
} else {
QMessageBox : : critical ( this , tr ( " Wrong Privatkey format " ) ,
QMessageBox : : critical ( this , tr ( " Wrong Privatkey format " ) ,
tr ( " Privatkey should start with U (for taddr) or secret- (for zaddr) " ) + " \n " ) ;
tr ( " Privatkey should start with 5, K, L or U (for taddr) or secret- (for zaddr) " ) + " \n " ) ;
return ;
return ;
}
}
}
}
@ -1052,8 +1056,8 @@ void MainWindow::payhushURI(QString uri, QString myAddr) {
pui . buttonBox - > button ( QDialogButtonBox : : Save ) - > setVisible ( true ) ;
pui . buttonBox - > button ( QDialogButtonBox : : Save ) - > setVisible ( true ) ;
pui . helpLbl - > setText ( QString ( ) %
pui . helpLbl - > setText ( QString ( ) %
tr ( " Please paste your private key(zs-Addr or R-addr) here, one per import " ) % " . \n " %
tr ( " Please paste your private key(zs-Addr or R-addr) here, one per import " ) % " . \n " %
tr ( " Caution: If this key is for Zs-addr it will be NOT inlcude in your Seed. Please send them direct to a Seed zs- addr " ) % " . \n " %
tr ( " Caution: If this key is for a zaddr it will be NOT included in your Seed. Please send them direct to a Seed zaddr " ) % " . \n " %
tr ( " R-addr keys will be autoshield to a seed zs-addr " )
tr ( " Transparent address (R.. or t1..) keys will be automatically sent to a zaddr in your Seed " )
) ;
) ;
if ( d . exec ( ) = = QDialog : : Accepted & & ! pui . privKeyTxt - > toPlainText ( ) . trimmed ( ) . isEmpty ( ) ) {
if ( d . exec ( ) = = QDialog : : Accepted & & ! pui . privKeyTxt - > toPlainText ( ) . trimmed ( ) . isEmpty ( ) ) {