-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy pathparaWallet.ts
More file actions
71 lines (61 loc) · 1.8 KB
/
paraWallet.ts
File metadata and controls
71 lines (61 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { connectorsForWallets } from '@getpara/rainbowkit'
import {
ConstructorOpts,
Environment,
GetParaIntegratedOpts,
getParaWalletIntegrated,
OAuthMethod,
ParaWeb,
type ParaModalProps,
} from '@getpara/rainbowkit-wallet'
import i18n from '../../i18n'
import { ENS_LINKS, WC_PROJECT_ID } from '../constants'
import { transports } from './wagmi'
const prodParaApiKey = 'c5695b18d016139ac4db1c7f98a87e68'
const APP_NAME = 'ENS'
const PARA_ENV: Environment = prodParaApiKey ? Environment.PROD : Environment.BETA
const PARA_API_KEY = prodParaApiKey || 'de88c0d78a98dd9a3b11897893997b06'
const paraConstructorOpts: ConstructorOpts = {
// Passkey Portal Branding
portalBackgroundColor: '#FFFFFF',
portalPrimaryButtonColor: '#5298FF',
portalTextColor: '#000000',
portalPrimaryButtonTextColor: '#FFFFFF',
// User Email Branding
emailTheme: 'light' as any,
emailPrimaryColor: '#5298FF',
githubUrl: ENS_LINKS.GITHUB,
xUrl: ENS_LINKS.X,
homepageUrl: ENS_LINKS.HOMEPAGE,
supportUrl: ENS_LINKS.EMAIL,
}
export const paraClient = new ParaWeb(PARA_ENV, PARA_API_KEY, paraConstructorOpts)
export const paraModalProps = {
appName: 'ENS Manager App',
oAuthMethods: [
OAuthMethod.GOOGLE,
OAuthMethod.TWITTER,
OAuthMethod.DISCORD,
OAuthMethod.APPLE,
OAuthMethod.FACEBOOK,
],
} as const satisfies Partial<ParaModalProps>
const paraWalletItegratedOpts: GetParaIntegratedOpts = {
para: paraClient,
nameOverride: i18n.t('para.signInWithPara'),
iconBackgroundOverride: '#ffffff',
transports,
}
export const paraWallet = getParaWalletIntegrated(paraWalletItegratedOpts)
export const paraWalletConnectorFn = connectorsForWallets(
[
{
groupName: 'Sign up or log in',
wallets: [paraWallet],
},
],
{
appName: APP_NAME,
projectId: WC_PROJECT_ID,
},
)[0]