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

feat: Use wert for collection fees #3058

Merged
merged 48 commits into from
Mar 22, 2024
Merged

Conversation

fzavalia
Copy link
Contributor

@fzavalia fzavalia commented Mar 18, 2024

Feature is enabled by the builder-publish-collections-wert flag. The flag only shows or hides the button to "buy with card" the rest of the UI changes are not behind the flag given that they are an enhancement and align more with the provided designs.

The most affected part codewise is the handlePublishCollectionRequest saga. which now receives a paymentMethod param to determine if the user wants to pay with card or MANA. Paying with MANA flow is unnafected. Paying with card will use the openFiatGatewayWidgetRequest from decentraland-dapps.

No new components were created for this feature, only some styles and elements from the already existing publish flow were updating.

Copy link

vercel bot commented Mar 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2024 4:15pm

@coveralls
Copy link

coveralls commented Mar 18, 2024

Pull Request Test Coverage Report for Build 8393232998

Details

  • 52 of 75 (69.33%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 45.903%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/modules/collection/sagas.ts 29 52 55.77%
Totals Coverage Status
Change from base Build 8333373356: 0.2%
Covered Lines: 5199
Relevant Lines: 10288

💛 - Coveralls

})

// TODO: Test the rest of the saga.
// Not included in this PR given that I don't know how to test event channels yet. 👌
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👌

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👌

public/images/cards.png Outdated Show resolved Hide resolved
src/modules/common/sagas.ts Outdated Show resolved Hide resolved
Comment on lines +448 to +459
partnerId = '01HRRQQ70YK4SP88GHM9A61P6B'
commodity = 'TT'
scAddress = '0xe539E0AED3C1971560517D58277f8dd9aC296281'
network = 'mumbai'
origin = 'https://sandbox.wert.io'
break
case 'prod':
partnerId = '01HR4TB274GD2VNZW0VEAXNHW2'
commodity = 'MANA'
scAddress = '0x9D32AaC179153A991e832550d9F96441Ea27763A'
network = 'polygon'
origin = 'https://widget.wert.io'
Copy link
Contributor

Choose a reason for hiding this comment

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

These variables can be set as environment variables, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that the variables cannot be combined and they depend only in the env you are working on, seems unnecessary to add each one separately to the config files.

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case, you might want to use the environment variable from the envs lib, and put the stg and prod environment under the same place, what do you think?

src/modules/collection/sagas.ts Outdated Show resolved Hide resolved
src/modules/collection/sagas.ts Outdated Show resolved Hide resolved
src/modules/collection/sagas.spec.ts Show resolved Hide resolved
src/modules/collection/utils.spec.ts Outdated Show resolved Hide resolved
Comment on lines +448 to +459
partnerId = '01HRRQQ70YK4SP88GHM9A61P6B'
commodity = 'TT'
scAddress = '0xe539E0AED3C1971560517D58277f8dd9aC296281'
network = 'mumbai'
origin = 'https://sandbox.wert.io'
break
case 'prod':
partnerId = '01HR4TB274GD2VNZW0VEAXNHW2'
commodity = 'MANA'
scAddress = '0x9D32AaC179153A991e832550d9F96441Ea27763A'
network = 'polygon'
origin = 'https://widget.wert.io'
Copy link
Contributor

Choose a reason for hiding this comment

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

In that case, you might want to use the environment variable from the envs lib, and put the stg and prod environment under the same place, what do you think?

src/modules/collection/sagas.spec.ts Outdated Show resolved Hide resolved
@fzavalia fzavalia merged commit 5a1b851 into master Mar 22, 2024
7 checks passed
@fzavalia fzavalia deleted the feat/wert-for-collection-fees branch March 22, 2024 17:09
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.

None yet

3 participants