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

[EXP-846] feat: Handle nested objects on buildQueryString #16

Merged
merged 2 commits into from
May 6, 2024

Conversation

pitahorn
Copy link
Contributor

@pitahorn pitahorn commented May 3, 2024

Description

The username in the configuration options now has to be provided as an object. The buildQueryString method now stringifies the configuration data if it's an object.

The object:

options:  {
  "country": "cl",
  "holder_type": "individual",
  "product": "payments",
  "public_key": "pk_live_XXX",
  "username": {
    "editable": false,
    "value": "19518958-7"
  },
  "widget_token": "pi_XXX"
};

Gets turned into:

queryString = "public_key=pk_live_XXX&holder_type=individual&product=payments&username[value]=19518958-7&username[editable]=false&country=cl&widget_token=pi_XXX"

Requirements

  • Update the Fintoc Widget Web View to parse the username and preselectedUsername before sending them over to the script.

Additional changes

None.

@pitahorn pitahorn requested review from parayab and daleal May 3, 2024 18:59
@pitahorn pitahorn self-assigned this May 3, 2024
@pitahorn pitahorn changed the title [EXP-846] feat: Stringify config data if it's an object [EXP-846] feat: Y May 3, 2024
@pitahorn pitahorn changed the title [EXP-846] feat: Y [EXP-846] feat: Handle nested objects on buildQueryString May 3, 2024
@pitahorn pitahorn force-pushed the feat/update-query-string-builder branch from 7eddb8b to bf56cf0 Compare May 3, 2024 20:39
@pitahorn pitahorn requested review from daleal and nateare May 3, 2024 20:40
@pitahorn pitahorn force-pushed the feat/update-query-string-builder branch 2 times, most recently from d376703 to dc929ed Compare May 3, 2024 21:04
@pitahorn pitahorn marked this pull request as ready for review May 3, 2024 21:10
@pitahorn pitahorn force-pushed the feat/update-query-string-builder branch from dc929ed to 8072a0d Compare May 6, 2024 17:11
@pitahorn pitahorn requested a review from daleal May 6, 2024 19:10
Copy link
Member

@daleal daleal left a comment

Choose a reason for hiding this comment

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

I only have comments about the package.json scripts. After you fix those, this PR looks ready to merge!

@pitahorn pitahorn force-pushed the feat/update-query-string-builder branch from a5cca2b to 73fdbaf Compare May 6, 2024 21:27
@pitahorn pitahorn merged commit d8c0b0e into main May 6, 2024
1 check passed
@pitahorn pitahorn deleted the feat/update-query-string-builder branch May 10, 2024 01:31
pitahorn added a commit that referenced this pull request May 10, 2024
* chore: Update node types to v18 and add vitest (#17)

* chore: Update node types to v18 and add vitest

* fixup! chore: Update node types to v18 and add vitest

* chore: update vite to v5.0

* fixup! chore: update vite to v5.0

* [EXP-846] feat: Handle nested objects on `buildQueryString` (#16)

* feat: Stringify config data if it's an object

* feat: Add unit test for `buildQueryString`

* pre-release: prepare 1.0.1 release (#18)
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.

2 participants