-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'confirmpaymentreceived' api method #4669
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a preliminary refactoring for a new core TakeOfferModel, which is going to need logic (for api 'takeoffer') currently located in the unaccessible desktop module's offer package. This change injects service dependencies into the OfferUtil instance and removes those service dependency arguments from formerly static method signatures. Other changes include: - Moving some Volume calc methods from OfferUtil to VolumeUtil. - Moving some Coin calc methods from OfferUtil to CoinUtil. - Injecting OfferUtil into CreateOfferService and relevant offer data & view models. - Minor changes to TradeStatistics2, Trade, Offer & Contract, to use static methods moved from OfferUtil to the new VolumeUtil class. - Deletion of bisq.desktop.main.offer.MakerFeeProvider, and bisq.core.offer.MakerFeeProvider. They were unnecessary wrappers around a single OfferUtil method. - Renaming OfferUtilTest -> CoinUtilTest. - Moving tests in CoinCryptoUtilsTest to CoinUtilTest, and deleting CoinCryptoUtilsTest. - Adjusting affected offer data & view model tests.
This is the second prelimiary refactoring to prepare for a new core.api takeoffer impl. This effort is restrained by the desktop models' dependency on JFX properties, which could not be passed as arguments to the core OfferUtil. Changes include: - Moving utility logic into OfferUtil from OfferDataModel and MutableOfferDataModel. - Injecting OfferUtil into TakeOfferDataModel, for parent OfferDataModel. - Removing unused TradeManager from OfferBook. - Moving 'isHalCashAccount' acct type check to abstract PaymentAccount. - Moving 'getTradeCurrency' logic to abstract PaymentAccount from MutableOfferDataModel's 'setTradeCurrencyFromPaymentAccount', and changing affected classes: MutableOfferView, MutableOfferViewModel.
This is the first trade protocol method implementation. The changes needing the most scrutiny are in the new bisq.core.offer.takeoffer.TakeOfferModel, which duplicates logic in bisq.desktop.main.offer.takeoffer.TakeOfferDataModel that could not be moved into :core due to JFX dependencies. Changes include: - Adding new TradesService to grpc.proto. - Adding new CoreTradeService and GrpcOffersService. - Adding two utility methods to TakeOfferModel (instead of including them in TakeOfferModel). - Adding light proto wrapper bisq.core.api.model.TradeInfo (for CLI). - Moving static OfferInfo toOfferInfo from GrpcOffersService to OfferInfo. - Adding new CoreTradeService - Adding 'takeoffer' method to CliMain. - Adding new TakeOffer test and some refactoring of offer test classes.
- Add ConfirmPaymentStarted rpc to grpc.proto. - Add new method to GrpcTradesService, CoreTradesService, CoreApi, & CliMain. - Refactor api offer/trade test hierarchy, and add new test case.
- Add ConfirmPaymentReceived rpc to grpc.proto. - Add new method to GrpcTradesService, CoreTradesService, CoreApi, & CliMain. - Add new test case. - Change TakeOfferDataModel to use recently added paymentAccount.isHalCashAccount().
Closing, too many file conflicts in this PR chain, after 1.4.x merge into main, will redo. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add '
confirmpaymentreceived
' api methodAdd
ConfirmPaymentReceived
rpc to grpc.proto.Add new method to
GrpcTradesService
,CoreTradesService
,CoreApi
, &CliMain
.Add new test case.
TakeOfferDataModel
uses recently addedpaymentAccount.isHalCashAccount()
.PR #4668 needs to be reviewed and merged before this one.