fix zs address error

This commit is contained in:
DenioD
2019-10-27 20:24:28 +01:00
9 changed files with 18 additions and 37 deletions

View File

@@ -19,10 +19,10 @@ release: target/release/silentdragonlite.$(EXT)
debug: target/debug/silentdragonlite.$(EXT)
target/release/silentdragonlite.$(EXT): src/lib.rs Cargo.toml
CFLAGS=$(CFLAGS) cargo build --lib --release
LIBS="" CFLAGS=$(CFLAGS) cargo build --lib --release
target/debug/silentdragonlite.$(EXT): src/lib.rs Cargo.toml
CFLAGS=$(CFLAGS) cargo build --lib
LIBS="" CFLAGS=$(CFLAGS) cargo build --lib
clean:
rm -rf target

View File

@@ -14,25 +14,6 @@
<string>Confirm Transaction</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>From</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="sendFrom">
<property name="text">
<string notr="true"/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="sendToAddrs">
<property name="title">

View File

@@ -387,10 +387,17 @@ void Controller::refreshTransactions() {
address = (it["address"].is_null() ? "" : QString::fromStdString(it["address"]));
model->markAddressUsed(address);
QString memo;
if (!it["memo"].is_null()) {
memo = QString::fromStdString(it["memo"]);
}
items.push_back(TransactionItemDetail{
address,
CAmount::fromqint64(it["amount"].get<json::number_integer_t>()),
""
memo
});

View File

@@ -39,7 +39,7 @@ void LiteInterface::createNewZaddr(bool, const std::function<void(json)>& cb) {
if (conn == nullptr)
return;
conn->doRPCWithDefaultErrorHandling("new", "zs1", cb);
conn->doRPCWithDefaultErrorHandling("new", "z", cb);
}
void LiteInterface::createNewTaddr(const std::function<void(json)>& cb) {

View File

@@ -150,8 +150,8 @@ public:
parser.setApplicationDescription("Shielded desktop light wallet for hush");
parser.addHelpOption();
// Positional argument will specify a zcash payment URI
parser.addPositionalArgument("zcashURI", "An optional hush URI to pay");
// Positional argument will specify a hush payment URI
parser.addPositionalArgument("hushURI", "An optional hush URI to pay");
parser.process(a);

View File

@@ -285,7 +285,7 @@ void MainWindow::setupSettingsModal() {
// Enable the troubleshooting options only if using embedded hushd
if (!rpc->isEmbedded()) {
settings.chkRescan->setEnabled(false);
settings.chkRescan->setToolTip(tr("You're using an external hushd. Please restart zcashd with -rescan"));
settings.chkRescan->setToolTip(tr("You're using an external hushd. Please restart hushd with -rescan"));
}
if (settingsDialog.exec() == QDialog::Accepted) {

View File

@@ -606,14 +606,7 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
// Syncing warning
confirm.syncingWarning->setVisible(Settings::getInstance()->isSyncing());
// And FromAddress in the confirm dialog
confirm.sendFrom->setText(fnSplitAddressForWrap(tx.fromAddr));
confirm.sendFrom->setFont(fixedFont);
QString tooltip = tr("Current balance : ") +
rpc->getModel()->getAllBalances().value(tx.fromAddr).toDecimalhushUSDString();
tooltip += "\n" + tr("Balance after this Tx: ") +
(rpc->getModel()->getAllBalances().value(tx.fromAddr) - totalSpending).toDecimalhushUSDString();
confirm.sendFrom->setToolTip(tooltip);
// Show the dialog and submit it if the user confirms
return d.exec() == QDialog::Accepted;
@@ -686,7 +679,7 @@ void MainWindow::sendButton() {
}
QString MainWindow::doSendTxValidations(Tx tx) {
if (!Settings::isValidAddress(tx.fromAddr)) return QString(tr("From Address is Invalid"));
for (auto toAddr : tx.toAddrs) {
if (!Settings::isValidAddress(toAddr.addr)) {

View File

@@ -150,7 +150,7 @@ bool TxTableModel::exportToCsv(QString fileName) const {
}
}
if (role == Qt::DecorationRole && index.column() == 0) {
if (role == Qt::DecorationRole && index.column() == 0) {
bool hasMemo = false;
for (int i=0; i < dat.items.length(); i++) {
if (!dat.items[i].memo.isEmpty()) {

View File

@@ -320,7 +320,7 @@ void AppDataServer::updateUIWithNewQRCode(MainWindow* mainwindow) {
if (ipv4Addr.isEmpty())
return;
QString uri = "ws://" + ipv4Addr + ":8237";
QString uri = "ws://" + ipv4Addr + ":8777";
// Get a new secret
unsigned char* secretBin = new unsigned char[crypto_secretbox_KEYBYTES];