Skip to content

Commit ff98112

Browse files
committed
fix(integrations): route the editor's service-account setup modal through the shared target
The workflow editor's credential selector passed the OAuth service's own name and icon straight to ConnectServiceAccountModal, so opening the setup form from a Jira block titled it "Add Jira service account" while the integrations page and the chat — both of which already resolve through `useServiceAccountConnectTarget` — titled the same form "Add Atlassian service account". That is the exact confusion this branch set out to remove, surviving on the one surface that bypassed the shared resolver.
1 parent e09d3c7 commit ff98112

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/credential-selector.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -511,16 +511,14 @@ export function CredentialSelector({
511511
/>
512512
)}
513513

514-
{showSetupModal && serviceAccountService?.serviceAccountProviderId && (
514+
{showSetupModal && serviceAccountTarget && (
515515
<ConnectServiceAccountModal
516516
open={showSetupModal}
517517
onOpenChange={setShowSetupModal}
518518
workspaceId={workspaceId}
519-
serviceAccountProviderId={
520-
serviceAccountService.serviceAccountProviderId as ServiceAccountProviderId
521-
}
522-
serviceName={serviceAccountService.name}
523-
serviceIcon={serviceAccountService.icon}
519+
serviceAccountProviderId={serviceAccountTarget.serviceAccountProviderId}
520+
serviceName={serviceAccountTarget.serviceName}
521+
serviceIcon={serviceAccountTarget.serviceIcon}
524522
onCreated={(newCredentialId) => {
525523
setStoreValue(newCredentialId)
526524
refetchCredentials()

0 commit comments

Comments
 (0)