Skip to content

Commit 3031936

Browse files
committed
fix rejection
1 parent f34d55a commit 3031936

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

src/components/EnterpriseFluxNodeStart/EnterpriseFluxNodeStart.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ import './EnterpriseFluxNodeStart.css';
1919

2020
const { Text } = Typography;
2121

22+
interface EnterpriseFluxNodeStartResponse {
23+
status: string;
24+
result?: { signedTxHex: string };
25+
data?: string;
26+
errorCode?: string;
27+
}
28+
2229
interface EnterpriseFluxNodeStartProps {
2330
open: boolean;
24-
openAction: (
25-
data: { status: string; result?: { signedTxHex: string } } | null,
26-
) => void;
31+
openAction: (data: EnterpriseFluxNodeStartResponse | null) => void;
2732
requesterInfo: WkSignRequesterInfo | null;
2833
chain: string;
2934
orgIndex: number;
@@ -91,10 +96,14 @@ function EnterpriseFluxNodeStart({
9196
result: { signedTxHex: enterpriseFluxNodeStarted.signedTxHex },
9297
});
9398
} else {
94-
setError(
99+
const rejectionMessage =
95100
enterpriseFluxNodeStarted.error ||
96-
t('home:enterpriseFluxNodeStart.key_rejected'),
97-
);
101+
t('home:enterpriseFluxNodeStart.key_rejected');
102+
openAction({
103+
status: 'ERROR',
104+
data: rejectionMessage,
105+
errorCode: 'KEY_REJECTED',
106+
});
98107
}
99108
clearEnterpriseFluxNodeStarted?.();
100109
}

0 commit comments

Comments
 (0)