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

Hotfix: Onboarding fix redirects #2470

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion onboarding-api/env-vars/demo.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REDIRECT_URL=https://app-demo.k-f.dev
MEMBERLIST_ADMIN_PURE_PROXY=kAM1ELFDHdHeLDAkAdwEnfufoCL5hpUycGs4ZQkSQKVpHFoXm
COLLATOR_WSS_URL=wss://fullnode.moonbase-dev.cntrfg.com/public-ws
COLLATOR_WSS_URL=wss://fullnode-apps.demo.k-f.dev
RELAY_WSS_URL=wss://frag-moonbase-relay-rpc-ws.g.moonbase.moonbeam.network
INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550
EVM_NETWORK=goerli
Expand Down
6 changes: 3 additions & 3 deletions onboarding-api/src/controllers/kyb/verifyBusiness.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Request, Response } from 'express'
import { bool, InferType, object, string } from 'yup'
import { InferType, bool, object, string } from 'yup'
import { EntityUser, OnboardingUser, validateAndWriteToFirestore } from '../../database'
import { sendVerifyEmailMessage } from '../../emails/sendVerifyEmailMessage'
import { fetchUser } from '../../utils/fetchUser'
Expand Down Expand Up @@ -160,8 +160,8 @@ const startManualKyb = async (req: Request, res: Response, user: EntityUser) =>
reference: MANUAL_KYB_REFERENCE,
email: body.email,
country: body.jurisdictionCode,
redirect_url: `${origin}/manual-kyb-redirect.html`,
callback_url: `${callbackBaseUrl}/manualKybCallback?${searchParams}`,
redirect_url: `${origin}#/manual-kyb-redirect.html`,
callback_url: `${callbackBaseUrl}#/manualKybCallback?${searchParams}`,
}

const manualKyb = await shuftiProRequest(payloadmanualKYB)
Expand Down
2 changes: 1 addition & 1 deletion onboarding-api/src/emails/sendApproveInvestorMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const sendApproveInvestorMessage = async (
],
dynamic_template_data: {
trancheName: tranche?.currency.name,
poolUrl: `${process.env.REDIRECT_URL}/pools/${poolId}`,
poolUrl: `${process.env.REDIRECT_URL}#/pools/${poolId}`,
},
},
],
Expand Down
6 changes: 3 additions & 3 deletions onboarding-api/src/emails/sendDocumentsMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ export const sendDocumentsMessage = async (
},
],
dynamic_template_data: {
rejectLink: `${process.env.REDIRECT_URL}/onboarding/updateInvestorStatus?token=${encodeURIComponent(
rejectLink: `${process.env.REDIRECT_URL}#/onboarding/updateInvestorStatus?token=${encodeURIComponent(
token
)}&status=rejected&metadata=${pool?.metadata}`,
approveLink: `${process.env.REDIRECT_URL}/onboarding/updateInvestorStatus?token=${encodeURIComponent(
approveLink: `${process.env.REDIRECT_URL}#/onboarding/updateInvestorStatus?token=${encodeURIComponent(
token
)}&status=approved&metadata=${pool?.metadata}&network=${wallet.network}`,
disclaimerLink: `${process.env.REDIRECT_URL}/disclaimer`,
disclaimerLink: `${process.env.REDIRECT_URL}#/disclaimer`,
trancheName: tranche?.currency.name,
investorEmail,
},
Expand Down
4 changes: 2 additions & 2 deletions onboarding-api/src/emails/sendVerifyEmailMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const sendVerifyEmailMessage = async (user: OnboardingUser, wallet: Reque
},
],
dynamic_template_data: {
verifyLink: `${process.env.REDIRECT_URL}/onboarding/verifyEmail?token=${encodeURIComponent(token)}`,
disclaimerLink: `${process.env.REDIRECT_URL}/disclaimer`,
verifyLink: `${process.env.REDIRECT_URL}#/onboarding/verifyEmail?token=${encodeURIComponent(token)}`,
disclaimerLink: `${process.env.REDIRECT_URL}#/disclaimer`,
},
},
],
Expand Down
Loading