aboutsummaryrefslogtreecommitdiff
path: root/src/qt/paymentserver.h
Commit message (Collapse)AuthorAgeFilesLines
* Move BIP70_MAX_PAYMENTREQUEST_SIZE to headerPieter Wuille2017-02-171-1/+1
| | | | | Github-Pull: #9785 Rebased-From: c801c82e253dc4956069b6110f65b43f538dd5a1
* [trivial] Fix typos in commentspracticalswift2017-01-271-2/+2
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* qt: Avoid OpenSSL certstore-related memory leakWladimir J. van der Laan2016-11-231-4/+1
| | | | - Correctly manage the X509 and X509_STORE objects lifetime.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* [Qt] add verifySize() function to PaymentServerPhilip Kaufmann2015-08-101-3/+3
| | | | | | | - add static verifySize() function to PaymentServer and move the logging on error into the function - also use the new function in the unit test - the function checks if the size is allowed as per BIP70
* qt: define QT_NO_KEYWORDSWladimir J. van der Laan2015-07-151-3/+3
| | | | | | | | QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`, `slots` and `emit` macros. Avoid overlap between Qt macros and boost - for example #undef hackiness in #6421.
* [Qt] constify first parameter of processPaymentRequest()Philip Kaufmann2015-04-151-1/+1
|
* [Qt] prevent amount overflow problem with payment requestsPhilip Kaufmann2015-02-041-0/+2
| | | | | | | | | | | | | | | | Bitcoin amounts are stored as uint64 in the protobuf messages (see paymentrequest.proto), but CAmount is defined as int64_t. Because of that we need to verify that single and accumulated amounts are in a valid range and no variable overflow has happened. - fixes #5624 (#5622) Thanks @SergioDemianLerner for reporting that issue and also supplying us with a possible solution. - add static verifyAmount() function to PaymentServer and move the logging on error into the function - also add a unit test to paymentservertests.cpp
* [Qt] Payment request expiration bug fix (re-done)Philip Kaufmann2015-01-151-0/+2
| | | | | | | | | | | | | | | - this is based on #4122 (which can be closed) Currently a payment request is only checked for expiration upon receipt. It should be checked again immediately before sending coins to prevent the user from paying to an expired invoice which would then require a customer service interaction. - add static verifyExpired() function to PaymentServer to be able to use the same validation code in GUI and unit-testing code - extend unit tests to use that function and also add an unit test which overflows, because payment requests allow expires as uint64, whereas we use int64_t for verification of expired payment requests
* [Qt] add payment request unit test for non matching networksPhilip Kaufmann2015-01-141-0/+3
| | | | | | - verify that payment request network matches client network - add static verifyNetwork() function to PaymentServer to be able to use the same validation code in GUI and unit-testing code
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* [Qt] update paymentserver license and cleanup orderingPhilip Kaufmann2014-12-081-3/+3
|
* [Qt] add BIP70 DoS protection testPhilip Kaufmann2014-12-081-1/+6
| | | | | - this test required to make readPaymentRequestFromFile() public in order to be able to is it in paymentservertests.cpp
* [Qt] add BIP70 payment request size DoS protection for URIsPhilip Kaufmann2014-12-081-1/+1
| | | | | | | | - current code only does this for payment request files, which are used on Mac - also rename readPaymentRequest to readPaymentRequestFromFile, so it's obvious that function only handles payment request files and not URIs - small logging changes in readPaymentRequestFromFile
* [Qt] make PaymentServer::ipcParseCommandLine voidPhilip Kaufmann2014-12-081-1/+1
| | | | | - the function only returned true, so make it void - add a comment about payment request network detection
* Fix all header definesPavel Janík2014-11-031-3/+4
|
* add NetworkIDString() to chainparamsPhilip Kaufmann2014-06-121-1/+0
| | | | | | - returns the BIP70 network string - use that new function in the core and GUI code and remove unused code and functions
* Use Params().NetworkID() instead of TestNet() from the payment protocoljtimon2014-06-041-0/+1
|
* Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron2014-02-091-1/+1
| | | | | | in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
* Merge pull request #3374Wladimir J. van der Laan2014-01-131-1/+1
|\ | | | | | | bd70562 [Qt] add messages when handling local payment request files (Philip Kaufmann)
| * [Qt] add messages when handling local payment request filesPhilip Kaufmann2013-12-101-1/+1
| | | | | | | | | | - important for the open URI dialog to give users feedback when a file is invalid etc.
* | ui: Fix GUI initialization orderWladimir J. van der Laan2014-01-051-1/+5
|/ | | | | | | | | | | | | | | | | | | Fixes at least #3478. Splits and documents the phases: 1. Parse command-line options. These take precedence over anything else. 2. Basic Qt initialization (not dependent on parameters or configuration) 3. Application identification 4. Initialization of translations 5. Now that settings and translations are available, ask user for data directory 6. Determine availability of data directory and parse bitcoin.conf 7. URI IPC sending 8. Main GUI initialization Splits command line parsing logic from ipcSendCommandLine into ipcParseCommandLine, as isTestNet() can only be overridden in the early stages before choosing a data directory. Sending however needs to happen after choosing a data directory.
* [Qt] misc PaymentServer changes (e.g. changes to eventFilter())Philip Kaufmann2013-12-061-4/+5
| | | | | | | | | | | | - make eventFilter() private and pass events on to QObject::eventFilter() instead of just returning false - re-work paymentservertest.cpp to correctly handle the event test after the above change (rewrite test_main to allow usage of QCoreApplication:: in the tests) - delete socket when we were unable to connect in ipcSendCommandLine() - show a message to the user if we fail to start-up (instead of just a debug.log entry) - misc small comment changes
* Merge pull request #3187 from Diapolo/netManagerWladimir J. van der Laan2013-11-111-3/+3
|\ | | | | [Qt] paymentserver: start netManager in uiReady()
| * [Qt] paymentserver: start netManager in uiReady()Philip Kaufmann2013-11-111-3/+3
| | | | | | | | | | | | | | | | | | | | - remove explicit init of netManager as this is done in the constructor anyway - move initNetManager() call to uiReady(), which removes an assert() and allows us to use message() in initNetManager() (currently unused but could be necessary because of proxy related messages) - make initNetManager() private - update paymentservertests.cpp
* | qt: add Open URI dialogWladimir J. van der Laan2013-11-111-1/+3
|/
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-5/+5
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Merge pull request #3145Wladimir J. van der Laan2013-11-061-1/+1
|\ | | | | | | | | | | | | 395d0d5 rework an ugly hack in processPaymentRequest() (Philip Kaufmann) 952d2cd make processPaymentRequest() use a single SendCoinsRecipient (Philip Kaufmann) 983cef4 payment-request UI: use SendCoinsRecipient.message for memo (Philip Kaufmann) c6c97e0 [Qt] Rework of payment request UI (mainly for insecure pr) (Philip Kaufmann)
| * make processPaymentRequest() use a single SendCoinsRecipientPhilip Kaufmann2013-10-311-1/+1
| | | | | | | | | | - as one this pulls main purpose is to change a payment request to be displayed as a single sendcoins entry
* | qt: add license header to source filesWladimir J. van der Laan2013-11-041-0/+4
|/ | | | Closes #839
* Qt: move paymentACK handling to paymentserverPhilip Kaufmann2013-10-241-1/+2
| | | | | | | | | - add new slot handlePaymentACK() to paymentserver, which handles paymentACK messages (currently we just display them) - make paymentACK message a modal information dialog - change some QObject::tr() to just tr() - clarify the processPaymentRequest() error, when IsDust() - small string change to prevent a tripple + usage with QString
* paymentserver: style fixes / cleanupPhilip Kaufmann2013-10-191-2/+2
| | | | | | | | - rename reportError() into message() to be in line with our default message() signal/slot naming (and can be used for all types of messages) - rename some QStrings to not collide with message() function - add a missing message for malformed URIs that IS also used in BitcoinGUI - fix / extend some comments and misc style fixes
* fix some cosmetic glitches in the codebasePhilip Kaufmann2013-09-091-3/+6
| | | | | | | | | | | - rename URL into URI in paymentserver where correct - add some missing Qt-coding-stuff in paymentserver - change QSpinBox to QLineEdit as base for BitcoinAmountField in .ui files (as this is the result when converting the BAF back into base) - remove some c_str() and replace with QString::fromStdString() - remove several new-lines - remove unneeded spaces - indentation fixes
* Bitcoin-Qt: fixes for using display unit from optionsPhilip Kaufmann2013-08-291-6/+12
| | | | | | | - extend PaymentServer with setOptionsModel() and rework initNetManager() to make use of that - fix all other places in the code to use display unit from options and no hard-coded unit
* Payment Protocol: X509-validated payment requestsGavin Andresen2013-08-221-7/+57
| | | | | | | | Add support for a Payment Protocol to Bitcoin-Qt. Payment messages are protocol-buffer encoded and communicated over http(s), so this adds a dependency on the Google protocol buffer library, and requires Qt with OpenSSL support.
* small indentation, space, formatting fixes (no code changes)Philip Kaufmann2013-04-061-0/+1
|
* Reimplement click-to-pay links. Add OSX support.Gavin Andresen2013-02-121-0/+66
Switch to using Qt's QLocalServer/QLocalSocket to handle bitcoin payment links (bitcoin:... URIs) Reason for switch: the boost::interprocess mechanism seemed flaky, and doesn't mesh as well with "The Qt Way" qtipcserver.cpp/h is replaced by paymentserver.cpp/h Click-to-pay now also works on OSX, with a custom Info.plist that registers Bitcoin-Qt as a handler for bitcoin: URLs and an event listener on the main QApplication that handles QFileOpenEvents (Qt translates 'url clicked' AppleEvents into QFileOpenEvents automagically).