From 9b22953f34cac373bccb97b82d50984d8442386c Mon Sep 17 00:00:00 2001 From: Julien Genestoux Date: Mon, 18 Mar 2024 08:24:40 -0400 Subject: [PATCH] feat(locksmith): changed the cc fee for Best Dish Ever --- locksmith/src/utils/pricing.ts | 16 ++++++++++++++++ .../src/components/content/DemoContent.tsx | 3 +++ yarn.lock | 10 ---------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/locksmith/src/utils/pricing.ts b/locksmith/src/utils/pricing.ts index 634fc79a73c..a973d16c5c3 100644 --- a/locksmith/src/utils/pricing.ts +++ b/locksmith/src/utils/pricing.ts @@ -149,6 +149,22 @@ export const getUnlockServiceFee = ( return Math.ceil(cost * 0.025) } + if ( + normalizer.ethereumAddress(options?.lockAddress) === + '0x68445fE0f063f60B3C2Ec460f13E17b7FCb868b9' + ) { + // For Best Dish Ever Sous Chef, we take 4% only + return Math.ceil(cost * 0.04) + } + + if ( + normalizer.ethereumAddress(options?.lockAddress) === + '0x1a84dEf3EC4d03E3c509E4708890dF9D4428f9fb' + ) { + // For Best Dish Ever OWNER CHEF MEMBER, we take 2% only + return Math.ceil(cost * 0.02) + } + return Math.ceil(cost * 0.1) // Unlock charges 10% of transaction. } diff --git a/unlock-app/src/components/content/DemoContent.tsx b/unlock-app/src/components/content/DemoContent.tsx index 183157173cd..2abf6255c8d 100644 --- a/unlock-app/src/components/content/DemoContent.tsx +++ b/unlock-app/src/components/content/DemoContent.tsx @@ -51,6 +51,9 @@ const usePaywall = () => { [url.searchParams.get('lock')]: { network: parseInt(url.searchParams.get('network'), 10), emailRequired: true, + paymentMethods: { + creditCard: false, + }, }, }, referrer, diff --git a/yarn.lock b/yarn.lock index 65ce52916c6..2e7b666beae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17136,15 +17136,6 @@ __metadata: languageName: node linkType: hard -"@stripe/crypto@npm:0.0.4": - version: 0.0.4 - resolution: "@stripe/crypto@npm:0.0.4" - peerDependencies: - "@stripe/stripe-js": ^1.46.0 - checksum: 10/7ab3c5d9dcd8164eab2fd79c2fcc53b88b5ef357410210bc99fd08f97500b2c69d011f5552f7aeb2d63503bf9abb93962f096e258becd9fad6048ede64abd80b - languageName: node - linkType: hard - "@stripe/react-stripe-js@npm:2.1.2": version: 2.1.2 resolution: "@stripe/react-stripe-js@npm:2.1.2" @@ -20273,7 +20264,6 @@ __metadata: "@radix-ui/react-avatar": "npm:1.0.4" "@rehooks/local-storage": "npm:2.4.5" "@sentry/nextjs": "npm:7.77.0" - "@stripe/crypto": "npm:0.0.4" "@stripe/react-stripe-js": "npm:2.1.2" "@stripe/stripe-js": "npm:1.54.2" "@tanstack/react-query": "npm:4.32.0"