Skip to content
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

Txs by sender api #4224

Merged
merged 6 commits into from
Jun 27, 2022
Merged

Txs by sender api #4224

merged 6 commits into from
Jun 27, 2022

Conversation

sstanculeanu
Copy link
Contributor

No description provided.

@sstanculeanu sstanculeanu self-assigned this Jun 24, 2022
@sstanculeanu sstanculeanu marked this pull request as ready for review June 24, 2022 19:55
@codecov-commenter
Copy link

codecov-commenter commented Jun 25, 2022

Codecov Report

❗ No coverage uploaded for pull request base (feat/new-tx-api@eb767dd). Click here to learn what that means.
The diff coverage is n/a.

@@                Coverage Diff                 @@
##             feat/new-tx-api    #4224   +/-   ##
==================================================
  Coverage                   ?   75.86%           
==================================================
  Files                      ?      645           
  Lines                      ?    85294           
  Branches                   ?        0           
==================================================
  Hits                       ?    64708           
  Misses                     ?    15789           
  Partials                   ?     4797           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb767dd...8391197. Read the comment docs.

@sstanculeanu sstanculeanu marked this pull request as draft June 27, 2022 08:39
@sstanculeanu sstanculeanu marked this pull request as ready for review June 27, 2022 10:00
@sstanculeanu sstanculeanu changed the base branch from development to feat/new-tx-api June 27, 2022 11:33
api/groups/transactionGroup.go Outdated Show resolved Hide resolved
api/groups/transactionGroup.go Outdated Show resolved Hide resolved
@bogdan-rosianu bogdan-rosianu self-requested a review June 27, 2022 11:51
api/groups/transactionGroup.go Outdated Show resolved Hide resolved
@@ -98,6 +98,16 @@ type txsPoolResponse struct {
Code string `json:"code"`
}

type txsForSenderResponseData struct {
TransactionsForSender common.TransactionsForSenderApiResponse `json:"transactionsForSender"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

json tag could have been transactions

@@ -30,6 +30,7 @@ const (
sendMultiplePath = "/send-multiple"
getTransactionPath = "/:txhash"
getTransactionsPool = "/pool"
getTransactionsPoolForSender = "/pool/:sender"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think /pool/by-sender/:sender it's better

@@ -103,6 +105,51 @@ func (atp *apiTransactionProcessor) GetTransactionsPool() (*common.TransactionsP
return txsPoolResponse, nil
}

// GetTransactionsPoolForSender will return a structure containing the transactions for sender that is to be returned on API calls
func (atp *apiTransactionProcessor) GetTransactionsPoolForSender(sender string) (*common.TransactionsPoolForSenderApiResponse, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in future refactors, we could have something like:
apiTransactionProcessor.GetTransactionsPool(options GetTxsPoolOptions) where GetTxsPoolOptions could contain WithSender string, WithReceiver string, WithFields []string and so on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noted, new PRs will be created for this

@sstanculeanu sstanculeanu merged commit 2e550f0 into feat/new-tx-api Jun 27, 2022
@sstanculeanu sstanculeanu deleted the txs_by_sender_api branch June 27, 2022 13:49
@sstanculeanu sstanculeanu added the ignore-for-release-notes Do not include item in release notes label Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release-notes Do not include item in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants