Skip to content

Commit

Permalink
Fix onboarding signer
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Oct 17, 2024
1 parent ec8b499 commit 95a35cc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions centrifuge-app/src/components/OnboardingAuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ export function OnboardingAuthProvider({ children }: { children: React.ReactNode

const { mutate: login, isLoading: isLoggingIn } = useMutation(async () => {
try {
const signer = await provider?.getSigner()
if (selectedAccount?.address && selectedWallet?.signer) {
await loginWithSubstrate(selectedAccount?.address, selectedWallet.signer as Signer, cent, proxy)
} else if (isEvmOnSubstrate && selectedAddress && provider?.getSigner()) {
await loginWithEvm(selectedAddress, provider.getSigner(), evmChainId, isEvmOnSubstrate)
} else if (selectedAddress && provider?.getSigner()) {
await loginWithEvm(selectedAddress, provider.getSigner(), evm.chainId)
} else if (isEvmOnSubstrate && selectedAddress && signer) {
await loginWithEvm(selectedAddress, signer, evmChainId, isEvmOnSubstrate)
} else if (selectedAddress && signer) {
await loginWithEvm(selectedAddress, signer, evm.chainId)
}
throw new Error('network not supported')
} catch {
Expand Down

0 comments on commit 95a35cc

Please sign in to comment.