Skip to content
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ VITE_GA_MEASUREMENT_ID=
VITE_POSTHOG_HOST=
VITE_POSTHOG_KEY=
VITE_TEMPO_ENV= # testnet|devnet|localnet
VITE_WEBAUTHN_AUTH_URL= # e.g. https://wallet.tempo.xyz/api/webauthn
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ interface EnvironmentVariables {
readonly VITE_POSTHOG_KEY: string
readonly VITE_POSTHOG_HOST: string
readonly VITE_TEMPO_ENV: 'localnet' | 'devnet' | 'moderato'
readonly VITE_WEBAUTHN_AUTH_URL?: string

readonly INDEXSUPPLY_API_KEY: string
readonly SLACK_FEEDBACK_WEBHOOK: string
Expand Down
44 changes: 23 additions & 21 deletions src/wagmi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,29 @@ export function getConfig(options: getConfig.Options = {}) {
chains: [chain],
connectors: [
...(import.meta.env.VITE_E2E === 'true'
? [
webAuthn(),
]
: [
tempoWallet({
authorizeAccessKey: () => ({
expiry: Expiry.days(1),
limits: [
{ token: pathUsd, limit: parseUnits('500', 6) },
{ token: alphaUsd, limit: parseUnits('500', 6) },
{ token: betaUsd, limit: parseUnits('500', 6) },
{ token: thetaUsd, limit: parseUnits('500', 6) },
],
}),
feePayer: {
precedence: 'user-first',
url: 'https://sponsor.moderato.tempo.xyz',
},
}),
webAuthn(),
]),
? [webAuthn()]
: [
tempoWallet({
authorizeAccessKey: () => ({
expiry: Expiry.days(1),
limits: [
{ token: pathUsd, limit: parseUnits('500', 6) },
{ token: alphaUsd, limit: parseUnits('500', 6) },
{ token: betaUsd, limit: parseUnits('500', 6) },
{ token: thetaUsd, limit: parseUnits('500', 6) },
],
}),
feePayer: {
precedence: 'user-first',
url: 'https://sponsor.moderato.tempo.xyz',
},
}),
webAuthn(
import.meta.env.VITE_WEBAUTHN_AUTH_URL
? { authUrl: import.meta.env.VITE_WEBAUTHN_AUTH_URL }
: undefined,
),
]),
],
multiInjectedProviderDiscovery,
storage: createStorage({
Expand Down
Loading