Commit graph

4120 commits

Author SHA1 Message Date
sqrrm
4e7283cc2c
Remove unused argument 2020-07-03 18:14:10 +02:00
sqrrm
22814d15f8
Publish own witness received as trade message 2020-07-03 18:14:10 +02:00
sqrrm
44c71bd704
Add TraderSignedWitnessMessage 2020-07-03 18:14:10 +02:00
sqrrm
6cd395c227
Change signAccountAgeWitness signature
Return the signed witness when signed by a trader
2020-07-03 18:14:10 +02:00
sqrrm
9a8622c410
Fix codacy comments 2020-07-03 17:35:54 +02:00
sqrrm
fabd592938
Merge remote-tracking branch 'origin/master' into HEAD 2020-07-03 16:58:13 +02:00
sqrrm
ac2f37f968
Merge pull request #4345 from jmacxx/fix_offer_fee_changed
Create order using the same tx fee specified at funding
2020-07-03 13:20:18 +02:00
Christoph Atteneder
a0ec617063
Merge pull request #4350 from m52go/zelle-update
Improve zelle payment account info text
2020-07-02 14:12:43 +02:00
Christoph Atteneder
5edb0d2eb8
Merge pull request #4349 from m52go/account-limits-update
Improve account limits popup text
2020-07-02 14:12:18 +02:00
m52go
ba5496205f
Improve account limits popup text 2020-07-01 11:47:18 -04:00
m52go
ef96fd3be8
Improve zelle payment account info text 2020-07-01 10:21:16 -04:00
sqrrm
44bdce7b5c
Merge pull request #4342 from wiz/update-mempool-explorer-urls
Update Bitcoin explorer URLs and Tor V3 onions for wiz and emzy
2020-07-01 15:53:20 +02:00
sqrrm
79f05bcfa3
Merge pull request #4320 from devinbileck/add-v3-seednode
Add V3 seednode devinv3r
2020-07-01 15:48:30 +02:00
sqrrm
2417cf2f61
Merge pull request #4313 from ncstdc/patch-1
Change "Move funds to Bisq wallet" to "Keep funds in Bisq wallet"
2020-07-01 12:10:05 +02:00
jmacxx
f3fa5ad3a1
Create order using the same tx fee specified at funding
This fixes an issue whereby updates from the fee API were causing
Insufficient Funds exception. Since the wallet is funded with a
specific amount (deposit+trade fee+txFee), that same amount has
to be used when the user confirms offer creation (which could be
some time later).

Fixes #4227
Fixes #4278
Fixes #4336
Fixes #4327
2020-06-29 13:43:06 -05:00
wiz
8dbb01c04f
Update Bitcoin explorer URLs and Tor V3 onions for wiz and emzy 2020-06-29 00:02:50 +09:00
Devin Bileck
3b424fde28
Merge branch 'master' of https://github.com/bisq-network/bisq into add-v3-seednode
 Conflicts:
	core/src/main/resources/btc_mainnet.seednodes
2020-06-26 03:46:24 -07:00
sqrrm
a54eeeabcc
Merge pull request #4329 from ghubstan/6-getoffers
Add rpc method 'getoffers'
2020-06-25 20:41:34 +02:00
sqrrm
79f0dacc24
Merge pull request #4324 from ghubstan/5A-print-addressinfo-as-table
Return protos from funding address methods
2020-06-25 19:44:24 +02:00
sqrrm
ca98654725
Merge pull request #4304 from ghubstan/2-getaddressbalance
Add rpc method 'getaddressbalance'
2020-06-25 19:41:21 +02:00
Christoph Atteneder
d810387b41
Merge pull request #4305 from sqrrm/sign-same-name
Sign same name
2020-06-25 14:07:24 +02:00
Christoph Atteneder
38f6af26ee
Merge pull request #4294 from sqrrm/add-multiple-fee-receivers
Add multiple fee receivers
2020-06-25 13:23:53 +02:00
Christoph Atteneder
e50c7a6132
Add equals check to prevent resetting of newly set Filter 2020-06-25 12:40:49 +02:00
sqrrm
1c9299a2e5
Merge pull request #4295 from ghubstan/rename-core-wallet-service
Rename CoreWalletService -> CoreWalletsService
2020-06-25 11:01:31 +02:00
ghubstan
51d82b1dff
Fix offer list filter bug due to direction flip
Respect the direction parmeter;  do not give it meaning it does not
have.  If the user passes a 'buy' parameter, return buy offers.  Do
not misinterpret the param's intent.  The direction parameter's value
does not imply "buy=I'm a buyer, show me sell offers" or
"sell=I'm a seller, show me buy offers".

I got mixed up by looking at the UI.  If I want to sell BTC, I click
the SELL tab to view buy offers (maker as buyer).  If I want to buy
BTC, I click the BUY tab to view sell offers (maker as seller).

This change also fixes an offer list sorting bug.

The commit is in response to a requested changes in PR 4329:
https://github.com/bisq-network/bisq/pull/4329#pullrequestreview-436033502
2020-06-23 17:15:39 -03:00
Stephan Oeste
e9562b0d9b
Add V3 seednode sn3emzy
As part of the Tor V3 upgrade, and the effort to increase the number of
Bisq seednodes from 8 to 12, this PR adds a new V3 seednode.
2020-06-23 19:07:06 +02:00
ghubstan
e1fddfacf8
Remove duplication in wallets availability checks
This change adds a new 'verifyWalletsAreAvailable' method to the client,
which eliminates this duplicated statement:
    throw new IllegalStateException("wallet is not yet available");

The commit is in response to a requested change in PR 4312:
https://github.com/bisq-network/bisq/pull/4312#pullrequestreview-435659314
2020-06-23 13:11:36 -03:00
ghubstan
61285a7602
Do not change case of input params in client
This commit is for a change requested in PR 4308:
https://github.com/bisq-network/bisq/pull/4308#pullrequestreview-435055483

  ".toUpperCase() seems misplaced here. It would soon get repetive.
  Whether the underlying logic differentiates between capitalizations
  is a low-level implementation detail and would do better at the
  lowest practical level."
2020-06-22 15:08:46 -03:00
ghubstan
4778976b6b
Fix comments 2020-06-20 20:24:49 -03:00
ghubstan
88cb90e209
Add rpc method 'getoffers'
The new method returns current buy or sell offers for a fiat ccy.

These changes need refactoring and polishing before merging, but they're
committed in this state to be safe (don't lose work).  Changes include:

* New core.grpc classes
    CoreOffersService
    GrpcOffersService
    model.OfferInfo

* CoreApi -- The new CoreOffersService is injected into CoreApi and
  the old getOffers() and placeOffer() impls were moved into the
  new CoreOffersService.  The getOffers implementation was re-done.
  Other changes are just rearranging location of core method calls.

* GrpcServer -- The new GrpcOffersService replaced the old
  GetOffersService and PlaceOfferService.

* grpc.proto -- The old GetOffers and PlaceOffer services were combined
  into a single Offers service, and the PlaceOffer rpc was renamed
  as CreateOffer.  These are the only substantive changes; the rest
  is just rearranging location of the service defs in the file.
  Also created a lighterweight OfferInfo proto message wrapper to
  be passed between server & client (client has no access to core's
  Offer and OfferPayload).

* OfferInfo -- A new wrapper around the OfferInfo proto message.

* CliMain -- The new GetOffers service stub was added.
  Some (maybe too much) number and ccy formatting logic was
  copied & modified from core.  Some tedius string formatting
  was added too (needs to be tidied up).

* License comments were also copied to several classes, and I
  made a mistake in reverting changes to the wrong file.

TODO add unit tests
2020-06-20 19:56:28 -03:00
ghubstan
41f1add76b
Remove try catch block
Remove the recently added gRPC StatusRuntimeException wrapping
logic because we want unexpected Exceptions to bubble up for now,
until CorePaymentAccountsService.java throws specific
IllegalStateExceptions with user friendly error messages.
(See CoreWalletsService.java for example.)
2020-06-20 10:24:14 -03:00
ghubstan
d6ea0ea236
Re-add license comment
The previous revert was a mistake.  It applied to
GrpcPaymentAccountsService, not CorePaymentAccountsService.
2020-06-20 10:21:57 -03:00
ghubstan
7c073c65f5
Revert "Add license comment"
This reverts commit bfcc693f69.

This change was reverted because we want unexpected Exceptions
to bubble up for now, until CorePaymentAccountsService.java
throws specific IllegalStateExceptions with user friendly
error messages.  (See CoreWalletsService.java for example.)
2020-06-20 10:14:36 -03:00
ghubstan
d06807b0e5
Wrap Exception from core in gRPC StatusRuntimeException 2020-06-20 10:10:39 -03:00
ghubstan
bfcc693f69
Add license comment 2020-06-20 10:03:10 -03:00
ghubstan
855ac0f250
Add license comment 2020-06-20 10:02:04 -03:00
ghubstan
37fb60672f
Add license comment
This is not in scope of current PR, but easy enough to review.
2020-06-20 09:59:06 -03:00
ghubstan
331f488057
Return protos from funding address methods
The 'getaddressbalance' and 'getfundingaddresses' methods now send
new AddressBalanceInfo proto messages instead of a formatted String
to the client.  The AddressBalanceInfo message contains addressString,
balance, and # of confirmations (transaction confidence) fields.

Changes include:
* A new AddressBalanceInfo proto message
* A wrapper class for the new AddressBalanceInfo proto
* New 'getaddressbalance' and 'getfundingaddresses' signatures in server
* AddressBalanceInfo display logic in client
* Removal of balance formatting logic in server
* Refactoring of balance formatting logic in client
2020-06-19 20:00:28 -03:00
ghubstan
1930411e61
Rmove blank line 2020-06-18 12:55:31 -03:00
ghubstan
b0e278f32e
Refactor getFundingAddresses to use memoization
Also reordered some import statements according to Bisq style rules.
2020-06-18 12:52:29 -03:00
Dominykas Mostauskis
c5134e14c2
Replace Tuple3 with memoization 2020-06-18 15:57:26 +02:00
Devin Bileck
5712de6b67
Add V3 seednode devinv3r
As part of the Tor V3 upgrade, and the effort to increase the number of
Bisq seednodes from 8 to 12, this PR adds a new V3 seednode.
2020-06-17 22:45:55 -07:00
ncstdc
9d327dc0d0
Change wording
Move funds to Bisq wallet > Keep funds in Bisq wallet
2020-06-16 11:32:41 -05:00
ghubstan
258d1801d2
Factor duplicate unlocked wallet checks into new method
Response to comment in PR 4299:
https://github.com/bisq-network/bisq/pull/4299#discussion_r440769032

This PR should be reviewed/merged after PR 4309.
https://github.com/bisq-network/bisq/pull/4309
2020-06-16 12:48:41 -03:00
ghubstan
bac3ed5697
Call core wallets service methods from CoreApi
This change is a refactoring of the gRPC Wallets service
for the purpose of making CoreApi the entry point to
all core implementations.  These changes should have been
made in PR 4295.
See https://github.com/bisq-network/bisq/pull/4295

The gRPC Wallet proto def name was changed to Wallets because
this service manages BSQ and BTC wallets, and GrpcWalletService
was changed to GrpcWalletsService for the same reason.

This PR should be reviewed/merged after PR 4308.
See https://github.com/bisq-network/bisq/pull/4308

This PR's branch was created from the PR 4308 branch.
2020-06-15 16:43:26 -03:00
ghubstan
a7542e98bf
Add rpc method 'createpaymentacct'
This addresses task 4 in issue 4257.
    https://github.com/bisq-network/bisq/issues/4257

This PR should be reviewed/merged after PR 4304.
    https://github.com/bisq-network/bisq/pull/4304

This new gRPC PaymentAccounts service method creates a dummy
PerfectMoney payment account for the given name, number and fiat
currency code, as part of the required "simplest possible trading
API" (for demo).   An implementation supporting all payment
methods is not in the scope.

Changes specific to the new rpc method implementation follow:

* New createpaymentacct method + help text was added to CliMain.
  Help text formatting was also changed to make room for larger
  method names and argument lists.

* The PaymentAccount proto service def was renamed PaymentAccounts
  to avoid a name collision, and the new rpc CreatePaymentAccount
  was made part of the newly named PaymentAccounts service def.

* New GrpcPaymentAccountsService (gRPC boilerplate) and
  CorePaymentAccountsService (method implementations) classes were
  added.

* The gRPC GetPaymentAccountsService stub was moved from GrpcServer
  to the new GrpcPaymentAccountsService class, and
  GrpcPaymentAccountsService is injected into GrpcServer.

* A new createpaymentacct unit test was added to the bats test
  suite (checks for successful return status code).

Maybe bit out of scope, some small changes were made towards making
sure the entire API is defined in CoreApi, which is used as a
pass-through object to the new CorePaymentAccountsService.  In the
next PR, similar refactoring will be done to make CoreApi the
pass-through object for all of the existing CoreWalletsService
methods.  (CoreWalletsService will be injected into CoreApi.)
In the future, all Grpc*Service implementations will call core
services through CoreApi, for the sake of consistency.
2020-06-15 14:32:14 -03:00
sqrrm
bdb7807131
Sign accounts with same name
If the user has an account that can sign, it signs other accounts with
the same holder name when they are added, or on startup if one of
several accounts with the same name got signer rights.
2020-06-14 20:08:22 +02:00
sqrrm
f02772e3a2
Add getOwnerId to PaymentAccountPayload for owner name comparison 2020-06-14 20:07:41 +02:00
ghubstan
b1228e5ea7
Add rpc method 'getaddressbalance'
This addresses task 2 in issue 4257
	https://github.com/bisq-network/bisq/issues/4257

This new gRPC Wallet service method displays the balance and number
of confimirmations of the most recent transaction for the given BTC
wallet address.

The new method required the usual boilerplate changes to grpc.proto,
CliMain, and GrpcWalletService.

Two unit tests to check error msgs was added to cli/test.sh.
2020-06-14 14:23:47 -03:00
ghubstan
2e415de4ad
Replace duplicate code in getFundingAddresses
Cleaned up the method body and improved the returned string's
formatting.  Also added a line for this method in the CLI help text.
2020-06-14 13:05:37 -03:00