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

Resolve conflicts with master #2433

Open
wants to merge 87 commits into
base: nitro-payments-dev
Choose a base branch
from

Conversation

Sneagan
Copy link
Contributor

@Sneagan Sneagan commented Mar 21, 2024

Summary

Type of Change

  • Product feature
  • Bug fix
  • Performance improvement
  • Refactor
  • Other

Tested Environments

  • Development
  • Staging
  • Production

Before Requesting Review

  • Does your code build cleanly without any errors or warnings?
  • Have you used auto closing keywords?
  • Have you added tests for new functionality?
  • Have validated query efficiency for new database queries?
  • Have documented new functionality in README or in comments?
  • Have you squashed all intermediate commits?
  • Is there a clear title that explains what the PR does?
  • Have you used intuitive function, variable and other naming?
  • Have you requested security and/or privacy review if needed
  • Have you performed a self review of this PR?

Manual Test Plan

pavelbrm and others added 30 commits January 4, 2024 18:45
* feat: implement solana address linking

* feat: implement solana address linking

go mod tidy

* feat: implement solana address linking

go mod tidy

* feat: implement solana address linking

add repo tests

* feat: implement solana address linking

address pr comments

* feat: implement solana address linking

address pr comments

* feat: resolve pr comments implement solana address linking
* feat: add self custody available field v4 get wallet

* feat: add self custody available field v4 get wallet
* feat: allow multiple cors origins for dapp

* chore: rename test filename to match src filename

* refactor: improve is allowed origin test

* refactor: rename dapp cors config as plural
* fix legacy creds by item id

* try fix lint

* fix: tidy up

* refactor: return 500 instead of 404 on type assertion failure

---------

Co-authored-by: PavelBrm <[email protected]>
* feat: remove expired challenges from the database

* refactor: use distinct loop variables for readability in test challenge
* refactor: refactor and improve receipt validation

* fix: delete unused var

* refactor: self-review
* feat: add solana to country code allow block list

* refactor: rename test regions decode

* fix: add solana to parameters v1 schema test
* feat: add jwt validation to android webhook

* test: add mock to android test and rename field
* feat: add new endpoint for creating order with receipt

* refactor: rewrite SubmitReceiptRequestV1 into ReceiptRequest

* test: add tests for validation

* fix: use const instead of magic numbers

* feat: get existing order and reply with 409 if found

* feat: add comment

* refactor: extract code to allow creating order for receipt

* refactor: further extract and reuse code

* refactor: move code for better diff

* refactor: make payment uris configurable per environment

* fix clean up

* feat: add Leo annual product

* feat: handle various release channels

* feat: support differentiation by env

* fix: silence unused linter

* feat: add support for env for items

* fix: use proper names and add iOS subscription names

* test: add test for parseSubmitReceiptRequest

* test: add test for skuNameByMobileName

* test: add test for newOrderItemReqForSubID

* test: add test for newCreateOrderReqNewLeo

* test: add test for newOrderItemReqNewLeoSet

* test: add test for newPaymentProcessorConfig

* test: add test for newMobileOrderMdata

* test: add test for newOrderNewForReq

* fix: fix stupid linter that does not understand code used with build tags

* test: add test for createOrderWithReceipt

* fix: unexport fields and remove type conversion

* fix: delete unnecesary and suboptimal helper

* test: add tests for handleReceiptErr
* updates to delete credentials to only hard delete where request id matches item id

* fix: clean up generated code

* Patches 2281 (#2314)

* fix: review

* test: add tests

* fix: use error for checking expectations

* adding check for not allowing delete if number of active credentials exceeds threshold

updates to multi-device improvements to get active credentials count

fixing delete tlv2 test cases to include new check call

fixing db field for request_id for tlv2 creds table

* review feedback improvements

* more review feedback improvements

* updates to pass time into deleteTLV2

* refactor: provide review feedback (#2325)

---------

Co-authored-by: PavelBrm <[email protected]>
Co-authored-by: Pavel Brm <[email protected]>
* feat: implement endpoint for checking order receipt

* test: implement tests for checkOrderReceipt

* refactor: move functions to legacy handler

* refactor: move code for easier diffs

* refactor: use functions for now

* chore: rollback some changes for submitReceipt for better diff

* fix: change from PATCH to POST

* fix: do not allow stripe on mobile orders for Leo
…r on challenge endpoint (#2339)

govalidator returns a false positive when checking the payment id so replace with an equals check.
Sneagan and others added 7 commits May 28, 2024 18:39
* feat: change request_id to disallow null and change index

* test: fix up broken tests

* test: fix up other tests
* feat: change request_id to disallow null and change index

* test: fix up broken tests

* test: fix up other tests

* fix: reimplement tlv2 submission reporting

* test: change to kick off CI

* fix: replace AreTimeLimitedV2CredsSubmitted nonsense with GetCredSubmissionReport

* feat: check number of batches

* feat: take limit into account when inserting tlv2

* test: trigger ci

* fix: check tx error
* feat: change request_id to disallow null and change index

* test: fix up broken tests

* test: fix up other tests

* fix: reimplement tlv2 submission reporting

* test: change to kick off CI

* fix: replace AreTimeLimitedV2CredsSubmitted nonsense with GetCredSubmissionReport

* feat: check number of batches

* feat: delete only tlv2 creds with req_id matching item_id

* test: fix some broken tests

* feat: take limit into account when inserting tlv2

* test: trigger ci

* fix: check tx error
#2528)

* feat: change request_id to disallow null and change index

* test: fix up broken tests

* test: fix up other tests

* fix: reimplement tlv2 submission reporting

* test: change to kick off CI

* fix: replace AreTimeLimitedV2CredsSubmitted nonsense with GetCredSubmissionReport

* feat: check number of batches

* feat: delete only tlv2 creds with req_id matching item_id

* test: fix some broken tests

* feat: implement endpoint for fetching num of active cred batches

* test: add tests for uniqBatchesTxTime

* test: add tests for countbatches

* test: fix test after fixing error message

* fix: use proper comparison

* test: use proper name for test

* feat: take limit into account when inserting tlv2

* test: trigger ci

* fix: check tx error
promotion.Service.hotWallet is not used after the initialization. Thus
the role of the relevant initialization code is reduced to verifying
the grant wallet environment. But this is done in IsUserKYC in any case.
So remove the relevant code.
@pavelbrm
Copy link
Contributor

pavelbrm commented Jun 5, 2024

A few PRs for Ntiro have been closed recently. Should this one follow the same path? @Sneagan

pavelbrm and others added 18 commits June 5, 2024 20:01
* fix: improve and simplify android receipt verification

* test: cover validateGoogleTime

* chore: trigger CI
* chore: no fingerprint verification when checking

uphold.IsUserKYC() is used only for online checks but not for payments.
So skip certificate fingerprint checks to prevent outages when Uphold
changes the certificate.

Remove unused uphold.Wallet.Logger. Wallet methods always extract the
logger from the passed Context. Plus remove from tests log level
initialization. It was no-op as LogLevelCTXKey must be zerolog.Level,
not a string.

CLOSE: #2394

* fix: review comments
* chore: update dependencies

* chore: update dependencies
* chore: run go mod tidy

* chore: tidy up existing code

* test: update tests

* chore: use better receiver name

* feat: parse play store dev notification and test

* feat: scaffold processing

* chore: mute linter

* feat: determine whether to process ntf or not

* test: add tests for playStoreDevNotification

* test: add more tests

* feat: process notification

* feat: clean up

* test: add tests for purchaseToken

* feat: expose play store params

* feat: skip any notifications before 2024-06-01

* chore: delete garbage from original implementation

* feat: handle disabled notifications case

* fix: fix typo

* feat: use explicitly utc on unix timestampts
Use io.ReadAll instead of requestutils.ReadJSON and increase the read timeout for grants server.
* feat: use docker login

* fix: pin to specific commit

* fix: specify pinned version
* chore: run go mod tidy

* chore: tidy up existing code

* test: update tests

* chore: use better receiver name

* feat: parse play store dev notification and test

* feat: scaffold processing

* chore: mute linter

* feat: determine whether to process ntf or not

* test: add tests for playStoreDevNotification

* test: add more tests

* feat: process notification

* feat: clean up

* test: add tests for purchaseToken

* feat: expose play store params

* feat: skip any notifications before 2024-06-01

* chore: delete garbage from original implementation

* feat: handle disabled notifications case

* fix: fix typo

* feat: use explicitly utc on unix timestampts

* fix: set proper order expiration upon linking (#2587)

* fix: wip

* fix: wip make it possible to set proper expiry date on order linking

* fix: wip more plumbing

* fix: reduce number of changes

* fix: fix typo in comment

* fix: commit correct tx

* fix: update existing tests

* fix: make linter happy

* fix: make verifyApple aware of time

* fix: add time to tests for verifyApple

* fix: add time to tests for findInAppBySubID and likes

* fix: expose receipt data in validateAppleTime and improve tests

* fix: expose receipt data in validateGoogleTime and improve tests

* fix: fix linking for v1.61.1

* fix: propagate receipt data

* fix: use receipt request for constructing ios receipt data

* fix: use receipt expiry on order

* fix: calculate expiry time for apple only once and add tests

* fix: update some comments

* fix: propagate changes to old submit receipt code and get rid of old nonse

* test: add tests for appendOrderMetadataTx

* feat: add new products for iOS (#2588)

* feat: add new products for iOS

* fix: change colon to period

* fix: use better method name updateOrderIntervals

* fix: use better test case names

* fix: make linter happy
@tackley
Copy link

tackley commented Aug 21, 2024

Is this still relevant? Or can we close or mark as draft please to remove from our needs-review lists?

@pavelbrm
Copy link
Contributor

@tackley I believe this is not relevant anymore, but will leave the decision to @Sneagan.

@tackley tackley removed request for a team September 24, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.