* XMR seller is prompted to enter txId and viewkey.
* looks up the XMR transaction to verify that it has confirmed
* user can run their own validating service, or use the ones provided
* 100% agreement of all chosen services is necessary for confirmation
* feature can be configured and turned on/off from settings screen
* feature can be globally turned off via admin filter
* two code review passes from chimp1984
* one text review from m52go
Main part missing is the XMR proof service request processing. I did not
get the service compiled yet, so could not test response data and error
conditions.
Further it is missing a "news badge" and popup to guide the user to the
new feature.
Only basic dev tested so far.
Anyone welcome to pick the project up from here as I might not have
time soon to continue.
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
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
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.
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.
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.
This addresses task #1 in issue https://github.com/bisq-network/bisq/issues/4257.
This new gRPC WalletService method displays the BTC wallet's list of
receiving addresses. The balance and number of confirmations
for the most recent transaction is displayed to the right of each
address. Instead of returning a gRPC data structure to the client,
the service method returns a formatted String.
If the BTC wallet has no unused addresses, one will be created and
included in the returned list, and it can be used to fund the wallet.
The new method required injection of the BtcWalletService into CoreWalletsService,
and the usual boilerplate changes to grpc.proto, CliMain, and GrpcWalletService.
Some of the next PRs (for #4257) will require some common functionality within
CoreWalletsService, so these additional changes were included:
* a private, class level formatSatoshis function
* a public getNumConfirmationsForMostRecentTransaction method
* a public getAddressBalance method
* a private getAddressEntry method
A unit test that verifies a successful return status was added to cli/test.sh.
Previously, each wallet-related method was implemented with its own grpc
service. There is no need to do this, as a grpc service may declare
multiple rpc methods. This commit refactors everything wallet-related
into a single GrpcWalletService and also extracts a CoreWalletService
from CoreApi in order to avoid the latter becoming overly large.
Ideally, there would be no need for an abstraction in bisq.grpc called
CoreWalletService; we would ideally use such a service implemented in
bisq.core. The closest we have is WalletsManager, but it is not designed
to be used the way we are using it here in the grpc context. Rather than
making changes directly to core (which can be very risky), we will
rather make them here in this layer, designing exactly the "core wallet
service" we need, and can then later see about folding it into the
actual core.
This change removes non-idiomatic gRPC *Reply proto message fields.
The client should not receive success/fail values from server methods
with a void return type, nor an optional error_message from any server
method. This change improves error handling by wrapping an appropriate
gRPC Status with a meaningful error description in a StatusRuntimeException,
and placing it in the server's response StreamObserver. User error
messages are mapped to general purpose gRPC Status codes in a new ApiStatus
enum class. (Maybe ApiStatus should be renamed to CoreApiStatus.)
Implemented lockwallet, unlockwallet, removewalletpassword, and
setwalletpassword methods with basic error handling.
Also added basic error handling to existing getbalance method,
and removed unused BalancePresentation from CoreAPI.
TODO: update help text
There is no actual requirement for this method, so removing it. It also
helps improve the implementation by removing the need for the static
'instance' field.
The former class is dead code, together with its store service, as they
were only referenced from CorePersistenceProtoResolver::fromProto, the
binding logic and from AppendOnlyDataStoreService by orphaned migration
code. However, migration from the old persisted data was completed long
ago and the store file is no longer being read or written from anywhere
in the codebase.
Also remove the associated PersistableEnvelope proto message type, along
with the TradeStatisticsList message type. The latter is long deprecated
and has no corresponding Java class implementing PersistableEnvelope, so
removing it won't change behaviour (outside the exception message thrown
when attempting to resolve it).
* Add signed witness filter
- Add a filter to pubkeys used in AccountAgeWitness signing
- Fix inverted arbitrator signing of initial account age witnesses from
disputes
- Add test to verify that signed witness filter works
- Add test to verify that the arbitrator signing was fixed
* Fix codacy complaints
* Prevent NullPointerException during toggle group initialization
* Add scrollbar to filter window
* Format test class
Co-authored-by: Christoph Atteneder <christoph.atteneder@gmail.com>
Remove an unnecessary PersistableEnvelope interface by making them
standalone @Value classes with private List fields, instead of extending
PersistableList. As they weren't using any functionality of the latter
other than the getList() and stream() methods, this should not alter
behaviour, outside MeritList::toString.
Also comment out the MERIT_LIST PersistableEnvelope protobuf message
type, which shouldn't be encountered as merit lists were never persisted
directly to a storage file.
This removes the last superfluous PersistableEnvelope implementations,
leaving the following type hierarchy:
PersistableEnvelope *
+- NavigationPath
+- PeerList
+- PersistableList *
+- ThreadedPersistableEnvelope *
| +- AccountAgeWitnessStore
| +- BlindVoteStore
| +- DaoStateStore
| +- PersistableNetworkPayloadList * is abstract
| +- ProposalStore
| +- SequenceNumberMap
| +- SignedWitnessStore
| +- TempProposalStore
| \- TradeStatistics2Store
\- UserThreadMappedPersistableEnvelope *
+- AddressEntryList
+- DisputeList *
| +- ArbitrationDisputeList
| +- MediationDisputeList
| \- RefundDisputeList
+- UserThreadMappedPersistableList *
| +- BallotList
| +- MyBlindVoteList
| +- MyProofOfBurnList
| +- MyProposalList
| +- MyReputationList
| +- MyVoteList
| +- PaymentAccountList
| \- UnconfirmedBsqChangeOutputList
+- PreferencesPayload
+- TradableList
\- UserPayload
This is done primarily for concision. This change also repackages
bisq.grpc => bisq.proto.grpc in anticipation of repackaging the
definitions in pb.proto from 'protobuf' to 'bisq.proto'. There should
not be any compatibility issues with doing this, but it's out of scope
here. When complete, the relationship between bisq.proto.grpc and
bisq.proto will be more intuitively clear, i.e. that bisq.proto.grpc has
certain dependencies on bisq.proto classes, but not the other way
around.