Browse Source

fix zs address error

pull/14/head
DenioD 4 years ago
parent
commit
6914279526
  1. 4
      lib/Makefile
  2. 19
      src/confirm.ui
  3. 9
      src/controller.cpp
  4. 2
      src/liteinterface.cpp
  5. 4
      src/main.cpp
  6. 2
      src/mainwindow.cpp
  7. 11
      src/sendtab.cpp
  8. 2
      src/txtablemodel.cpp
  9. 2
      src/websockets.cpp

4
lib/Makefile

@ -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

19
src/confirm.ui

@ -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">

9
src/controller.cpp

@ -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
});

2
src/liteinterface.cpp

@ -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) {

4
src/main.cpp

@ -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);

2
src/mainwindow.cpp

@ -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) {

11
src/sendtab.cpp

@ -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)) {

2
src/txtablemodel.cpp

@ -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()) {

2
src/websockets.cpp

@ -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];

Loading…
Cancel
Save