Commit graph

6752 commits

Author SHA1 Message Date
Christoph Atteneder
59d598da52
Update translations for v1.9.3 2022-06-23 09:44:57 +02:00
Christoph Atteneder
444f2183e5
Merge pull request #6236 from jmacxx/xmr_subaddresses
Feat: XMR subaddresses per account
2022-06-20 20:40:20 +02:00
ghubstan
2893ec2564
Block API attempt swap BSQ if !sufficient funds
This API bug was relying on the UI purposed TaskRunner to bubble up an
insufficient funds error to the client, but it cannot do that.
This change blocks the takeoffer attempt if sufficient funds are not
found after the swap model calculates the taker's trade amounts.

Related: https://github.com/bisq-network/bisq/pull/6221
Based on https://github.com/bisq-network/bisq/pull/6250.
Based on branch `add-api-price-service-getaverageprice`.
2022-06-20 12:00:39 -03:00
ghubstan
2c043b4b21
Minor refactoring 2022-06-18 11:24:39 -03:00
ghubstan
a12dd52b81
Add API method 'getavgbsqprice'
Returns volume weighted average BSQ price in BTC and USD over N days.

The need for this arose while creating a Java BSQ Swap bot example
(PR pending).  API bots can use this to determine whether or not to
take swap offers based on their price distance above or below the 30
(or 90) day trade price average.
2022-06-17 18:26:10 -03:00
ghubstan
ae41e98db9
Add API API method 'getnetwork'
Returns name of the BTC network API daemon is connected to.

I am working on some Java bot examples in another repo, and want to stop
worrying about accidentally simulating trade payments on mainnet, despite
all the warnings I add in comments.  The 'getnetwork' method allows bots
to know what network the API daemon is connected to, and gives API bot
devs and users a way to avoid one potential source of costly mistakes.

API CLI manpage and apitest case are included in this commit.
2022-06-16 15:31:03 -03:00
jmacxx
97ab98a0cf
Remove rules/penalties popup and other unused text resource. 2022-06-14 13:28:35 -05:00
jmacxx
920e05562c
Feat: XMR subaddresses per account
incremente subaddress index at the start of the trade

Add subaccounts

Rename XmrAccountHelper to XmrAccountDelegate
Add map as final non null value

Persist subaccounts in User

Add display of used subaddresses and tradeId in account summary.
Main address and account index are the unique key for sub accounts.
Use the initial subaddress chosen by the user.

chimp1984 code review patch.

News badge/info for Account, disable old ones.

Show XMR subaddress popup info at Account (news badge), not startup.
2022-06-14 09:53:44 -05:00
ghubstan
0fc22c02f4
Make API getoffers (altcoin) offer list order match UI
This change reverses the server-side sorting of returned altcoin
offer lists, to match the UI altcoin offer-book views' price ordering.
2022-06-14 11:42:55 -03:00
ghubstan
57509890f2
Throw client-friendly EX for payment sent/rcvd msgs
Don't depend on silent, UI purposed task runner errors if confirmpaymentstarted
or confirmpaymentreceived msgs are sent outside the proper context.
Throw a FailedPreconditionException instead, and it will be translated
into the proper gPRC StatusRuntimeException before being sent to client.

For BTC buyers and sellers, block the messaging attempt if the taker
deposit tx has not been confirmed.

For BTC sellers, block an attempt to send a confirmpaymentreceived message
until after receiving a confirmpaymentstarted message has been sent from
the buyer.
2022-06-13 21:16:14 -03:00
Christoph Atteneder
6fdd47917f
Merge pull request #6241 from jmacxx/buyer_start_payment_gui
Start payment screen reftext message & sizing fixes.
2022-06-09 10:08:52 +02:00
jmacxx
5bf2a78844
Start payment screen reftext message & sizing fixes. 2022-06-07 22:08:57 -05:00
jmacxx
82550314b4
Prevent account creation for banned Revolut GBP sort code 040075. 2022-06-04 10:47:27 -05:00
Christoph Atteneder
a62655c15d
Merge pull request #6217 from chimp1984/improve-xmr-proof-service
Improve xmr proof service
2022-06-01 09:16:48 +02:00
chimp1984
89293f1bbf
Use https://www.getmonero.org instead of https://web.getmonero.org 2022-05-31 12:28:59 +02:00
chimp1984
6c2b3629d4
Change link 2022-05-27 15:35:40 +02:00
chimp1984
259b799ae6
Move Monero related classes to xmr package 2022-05-26 23:42:30 +02:00
chimp1984
69b1a0027b
Compare canonicalTxKey with strict case check
Cleanups
2022-05-26 23:40:46 +02:00
chimp1984
7127bd5223
Add methods to ExcludesDelegateMethods 2022-05-26 23:35:13 +02:00
chimp1984
d2557181d0
Add popup and info about using dedicated wallets when changing Bisq data dir 2022-05-26 23:31:30 +02:00
chimp1984
7fe93d9be7
Add littleEndian conversions 2022-05-26 12:36:59 +02:00
chimp1984
ed4eaafcdf
Add toCanonicalTxKey method (not correct still) 2022-05-26 12:17:51 +02:00
chimp1984
5194aff311
Extract test 2022-05-26 11:57:17 +02:00
chimp1984
08a76229c1
Add knaccc package and dependent other packages 2022-05-26 11:46:32 +02:00
ghubstan
c9f3aa9edf
Block API takeoffer attempt if !sufficient btc in wallet
This API bug was relying on offer availability checks, but those do
not check the taker's wallet.  The take offer model makes the check convenient,
and a core.api NotAvailableException can be thrown from CoreTradesService,
then mapped to the appropriate gPRC UNAVAILABLE exception sent to clients.

A new test case is added for this change:  Bob's wallet is emptied, he
fails to take an offer, and Alice returns Bob's BTC.
2022-05-22 17:00:33 -03:00
ghubstan
7feecc9aca
Adjust to CJDNS network support in bitcoin-core v23
This change is backward compatible for bitcoin-core v22.
This change has not been tested against bitcoin-core v21, v20, v19.

See https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-23.0.md#p2p-and-network-changes
See https://github.com/bitcoin/bitcoin/blob/23.x/doc/cjdns.md
2022-05-21 17:03:14 -03:00
chimp1984
19643488b1
Add test 2022-05-21 01:43:20 +02:00
chimp1984
f97cc86470
Use equalsIgnoreCase for replay protection checks
Add check for duplicate txHash
Rename wrongly names variables at startRequestsIfValid
2022-05-21 00:32:52 +02:00
chimp1984
e97ba5aebb
Add comment to viewkey/txKey mismatch due dual mode explorer API 2022-05-21 00:30:19 +02:00
jmacxx
62719615a9
Prevent shutdown if trade is in process of being taken. 2022-05-18 18:05:05 -05:00
jmacxx
0726bdff7e
Prevent shutdown if trade is in process of being taken. 2022-05-17 12:10:23 -05:00
Bisq GitHub Admin
6fa87aea11
Merge pull request #6204 from chimp1984/add-revenue-chart
Add chart series for total trade fees
2022-05-16 16:58:27 +02:00
Christoph Atteneder
52b1e13d46
Merge pull request #6200 from jmacxx/fix_issue_6175
Refactor BSQ fee validation to handle multiple txins.
2022-05-16 16:15:25 +02:00
Christoph Atteneder
0925370121
Merge pull request #6202 from ghubstan/fix-editoffer-price-bug
Fix API editoffer bug: set fixed-price=0 on margin offers
2022-05-16 16:11:48 +02:00
chimp1984
0ed03fc790
Add series for burned BSQ from btc fees and arbitration 2022-05-15 23:42:18 +02:00
jmacxx
574510d172
Attempt self-ping 3 times before reporting error with connectivity. 2022-05-15 12:48:39 -05:00
chimp1984
492182a97d
Add half-year and quarter periods 2022-05-15 17:35:02 +02:00
chimp1984
5f2a430e4e
Add chart series for total trade fees
Fix missing color adoption for BSQ supply series
2022-05-15 15:39:59 +02:00
ghubstan
381985ec3a
Fix API editoffer bug: set fixed-price=0 on margin offers
This is causing erroneous PRICE_OUT_OF_TOLERANCE errors when trying
to take offers having (fixed) price!=0, and isUsingMktPriceMargin=true
in the payload.

The API daemon editoffer's treatment of (fixed) price and
isUsingMktPriceMargin flag in the API has been inconsistent with the UI.

With this change:  when isUsingMktPriceMargin=true, (fixed) price is
set to 0 on the server.  API clients, however, still must show the
calculated price when isUsingMktPriceMargin=true, making this fix hard
to test in the client.  The server will now throw an exception if
(fixed) price and isUsingMktPriceMargin flag in the API are not
properly set in the API server.

This fix is intended to prevent issues such as
https://github.com/bisq-network/bisq/issues/6170 from happening for
this reason.  The offer maker edited offers with API, creating
inconsistent state described above.  It is hoped the user's offers
can be fixed by editing them in the UI.

Based on `master`.
2022-05-14 18:14:49 -03:00
jmacxx
17a949e4d1
Refactor BSQ fee validation to handle multiple txins. 2022-05-12 21:14:26 -05:00
Christoph Atteneder
23347e6203
Add missing copyright notice 2022-05-10 11:20:25 +02:00
xyzmaker123
219b408b6a
Show changes in BSQ Supply over time - dynamic calculation 2022-05-10 10:30:25 +02:00
xyzmaker123
5fb1167a28
Show changes in BSQ Supply over time 2022-05-10 10:30:25 +02:00
Christoph Atteneder
8a13076b37
Merge pull request #6188 from xyzmaker123/mark-own-offers
Mark user's own offers in Market -> Offer book
2022-05-09 13:10:50 +02:00
xyzmaker123
2b69e34b3a
Mark user's own offers in Market -> Offer book 2022-05-05 10:59:50 +02:00
Christoph Atteneder
80aff38fe7
Merge pull request #6182 from jmacxx/txvalidator_fee_address_fix
Check current fee receiver list whenever a fee tx is validated.
2022-05-02 09:54:06 +02:00
jmacxx
b40e424389
Refresh current fee receiver list whenever a fee tx is validated. 2022-05-02 09:53:50 +02:00
ghubstan
740284ab0a
Adjust to renamed class: AustraliaPayidAccountPayload 2022-05-02 09:52:12 +02:00
ghubstan
03b6924508
Adjust to renamed class: AustraliaPayidAccountPayload 2022-05-02 09:52:12 +02:00
ghubstan
b011bae18f
Remove deleted (renamed) class 2022-05-02 09:52:11 +02:00