Skip to content

Commit

Permalink
feat(locksmith): changed the cc fee for Best Dish Ever
Browse files Browse the repository at this point in the history
  • Loading branch information
julien51 committed Mar 18, 2024
1 parent 1ce4d59 commit 9b22953
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
16 changes: 16 additions & 0 deletions locksmith/src/utils/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

Expand Down
3 changes: 3 additions & 0 deletions unlock-app/src/components/content/DemoContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const usePaywall = () => {
[url.searchParams.get('lock')]: {
network: parseInt(url.searchParams.get('network'), 10),
emailRequired: true,
paymentMethods: {
creditCard: false,
},
},
},
referrer,
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 9b22953

Please sign in to comment.