Skip to content

Commit

Permalink
Disable Unlock referrals for now (#4232)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding authored Dec 13, 2021
1 parent 7e17317 commit 04c017c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/features/PurchaseMembership/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('createPurchaseTx()', () => {
const expected = {
chainId: 100,
data:
'0x3f33133a0000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000fe5443fac29fa621cfc33d41d1927fd0f5e0bb7c0000000000000000000000004bbeeb066ed09b7aed07bf39eee0460dfa26152000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000',
'0x3f33133a0000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000fe5443fac29fa621cfc33d41d1927fd0f5e0bb7c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000',
from: '0xfE5443FaC29fA621cFc33D41D1927fd0f5E0bB7c',
gasPrice: '0x3b9aca00',
to: '0xf97f516Cc0700a4Ce9Ee64D488F744f631e1525d',
Expand Down Expand Up @@ -90,7 +90,7 @@ describe('createPurchaseTx()', () => {
const expected = {
chainId: 137,
data:
'0x3f33133a0000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000fe5443fac29fa621cfc33d41d1927fd0f5e0bb7c0000000000000000000000004bbeeb066ed09b7aed07bf39eee0460dfa26152000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000',
'0x3f33133a0000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000fe5443fac29fa621cfc33d41d1927fd0f5e0bb7c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000',
from: '0xfE5443FaC29fA621cFc33D41D1927fd0f5E0bB7c',
gasPrice: '0x3b9aca00',
to: '0x46522c5a1018E13E40e3117191200e4CF6039241',
Expand Down
3 changes: 2 additions & 1 deletion src/features/PurchaseMembership/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const createPurchaseTx = (payload: MembershipSimpleTxFormFull): Partial<I
const membershipSelected = payload.membershipSelected;

const weiPrice = toWei(membershipSelected.price, payload.asset.decimal ?? DEFAULT_ASSET_DECIMAL);
const useReferral = membershipSelected.networkId !== 'Ethereum';
// Referrals are disabled for now as per Unlock advice - usually we only want referrals enabled on cheaper networks since the referral logic adds to the gas cost
const useReferral = false;
const data = UnlockToken.purchase.encodeInput({
_value: weiPrice,
_recipient: payload.account.address,
Expand Down

0 comments on commit 04c017c

Please sign in to comment.