fix: open compliance setup after Twilio setup
fix: open Twilio setup for first trigger
This commit is contained in:
parent
6985c632cd
commit
cfecf4b5fd
2 changed files with 9 additions and 4 deletions
|
|
@ -27,6 +27,7 @@ const TriggerView = ({
|
||||||
showWizard,
|
showWizard,
|
||||||
config,
|
config,
|
||||||
toggleWizard,
|
toggleWizard,
|
||||||
|
addNewTriger,
|
||||||
customInfoRequests
|
customInfoRequests
|
||||||
}) => {
|
}) => {
|
||||||
const currency = R.path(['fiatCurrency'])(
|
const currency = R.path(['fiatCurrency'])(
|
||||||
|
|
@ -36,7 +37,7 @@ const TriggerView = ({
|
||||||
const [error, setError] = useState(null)
|
const [error, setError] = useState(null)
|
||||||
|
|
||||||
const [saveConfig] = useMutation(SAVE_CONFIG, {
|
const [saveConfig] = useMutation(SAVE_CONFIG, {
|
||||||
onCompleted: () => toggleWizard('off'),
|
onCompleted: () => toggleWizard(true),
|
||||||
refetchQueries: () => ['getData'],
|
refetchQueries: () => ['getData'],
|
||||||
onError: error => setError(error)
|
onError: error => setError(error)
|
||||||
})
|
})
|
||||||
|
|
@ -74,7 +75,7 @@ const TriggerView = ({
|
||||||
currency={currency}
|
currency={currency}
|
||||||
error={error?.message}
|
error={error?.message}
|
||||||
save={add}
|
save={add}
|
||||||
onClose={toggleWizard}
|
onClose={() => toggleWizard(true)}
|
||||||
customInfoRequests={customInfoRequests}
|
customInfoRequests={customInfoRequests}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
@ -83,7 +84,7 @@ const TriggerView = ({
|
||||||
<H2>
|
<H2>
|
||||||
It seems there are no active compliance triggers on your network
|
It seems there are no active compliance triggers on your network
|
||||||
</H2>
|
</H2>
|
||||||
<Button onClick={() => toggleWizard()}>Add first trigger</Button>
|
<Button onClick={addNewTriger}>Add first trigger</Button>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,10 @@ const Triggers = () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const [saveAccount] = useMutation(SAVE_ACCOUNT, {
|
const [saveAccount] = useMutation(SAVE_ACCOUNT, {
|
||||||
onCompleted: () => setTwilioSetupPopup(false),
|
onCompleted: () => {
|
||||||
|
setTwilioSetupPopup(false)
|
||||||
|
toggleWizard('newTrigger')()
|
||||||
|
},
|
||||||
refetchQueries: () => ['getData'],
|
refetchQueries: () => ['getData'],
|
||||||
onError: error => setError(error)
|
onError: error => setError(error)
|
||||||
})
|
})
|
||||||
|
|
@ -211,6 +214,7 @@ const Triggers = () => {
|
||||||
showWizard={wizardType === 'newTrigger'}
|
showWizard={wizardType === 'newTrigger'}
|
||||||
config={data?.config ?? {}}
|
config={data?.config ?? {}}
|
||||||
toggleWizard={toggleWizard('newTrigger')}
|
toggleWizard={toggleWizard('newTrigger')}
|
||||||
|
addNewTriger={addNewTriger}
|
||||||
customInfoRequests={enabledCustomInfoRequests}
|
customInfoRequests={enabledCustomInfoRequests}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue