mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 15:05:22 +02:00
update account context
This commit is contained in:
parent
da2d5997ac
commit
341ecc8508
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,7 @@ import { useEffect, useState } from 'react'
|
|||
import * as Sentry from '@sentry/react'
|
||||
import type { Logger } from '../providers/LogProvider'
|
||||
import toast from 'react-hot-toast'
|
||||
import { useAccountContext } from '../providers'
|
||||
import { useTellerApi } from '../api'
|
||||
import type {
|
||||
TellerConnectEnrollment,
|
||||
|
@ -45,6 +46,7 @@ export const useTellerConfig = (logger: Logger) => {
|
|||
export const useTellerConnect = (options: TellerConnectOptions, logger: Logger) => {
|
||||
const { useHandleEnrollment } = useTellerApi()
|
||||
const handleEnrollment = useHandleEnrollment()
|
||||
const { setAccountManager } = useAccountContext()
|
||||
const [loading, error] = useScript({
|
||||
src: TC_JS,
|
||||
checkForExisting: true,
|
||||
|
@ -124,7 +126,7 @@ export const useTellerConnect = (options: TellerConnectOptions, logger: Logger)
|
|||
logIt()
|
||||
const tellerInstance = createTellerInstance(institutionId)
|
||||
tellerInstance.open()
|
||||
setTeller(tellerInstance)
|
||||
setAccountManager({ view: 'idle' })
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue