Skip to content

Commit

Permalink
LedgerGuideBox에 data를 required로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Thunnini committed Dec 2, 2024
1 parent 5ce7ea7 commit 9b6701a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { PlainObject } from "@keplr-wallet/background";
import { FormattedMessage, useIntl } from "react-intl";

export const LedgerGuideBox: FunctionComponent<{
data?: {
data: {
keyInsensitive: PlainObject;
isEthereum: boolean;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { Column, Columns } from "../../../../components/column";
import {
SubmitStarknetTxHashMsg,
GetStarknetKeyParamsSelectedMsg,
PlainObject,
} from "@keplr-wallet/background";
import { InExtensionMessageRequester } from "@keplr-wallet/router-extension";
import { BACKGROUND_PORT, KeplrError } from "@keplr-wallet/router";
Expand Down Expand Up @@ -56,12 +57,18 @@ export const AccountActivationModal: FunctionComponent<{
chainId: string;

onAccountDeployed?: () => void;
}> = observer(({ close, goBack, chainId, onAccountDeployed }) => {

data?: {
keyInsensitive: PlainObject;
isEthereum: boolean;
};
}> = observer(({ close, goBack, chainId, onAccountDeployed, data }) => {
const {
chainStore,
accountStore,
starknetQueriesStore,
starknetAccountStore,
keyRingStore,
} = useStore();

const theme = useTheme();
Expand Down Expand Up @@ -320,6 +327,12 @@ export const AccountActivationModal: FunctionComponent<{
disableClick
/>
<LedgerGuideBox
data={
data || {
keyInsensitive: keyRingStore.selectedKeyInfo!.insensitive,
isEthereum: false,
}
}
isLedgerInteracting={isLedgerInteracting}
ledgerInteractingError={ledgerInteractingError}
isInternal={true}
Expand Down
4 changes: 4 additions & 0 deletions apps/extension/src/pages/starknet/sign/message/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ export const SignStarknetMessageView: FunctionComponent<{
<div style={{ marginTop: "0.75rem", flex: 1 }} />

<LedgerGuideBox
data={{
keyInsensitive: interactionData.data.keyInsensitive,
isEthereum: false,
}}
isLedgerInteracting={isLedgerInteracting}
ledgerInteractingError={ledgerInteractingError}
isInternal={interactionData.isInternal}
Expand Down
8 changes: 8 additions & 0 deletions apps/extension/src/pages/starknet/sign/tx/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,10 @@ export const SignStarknetTxView: FunctionComponent<{
/>

<LedgerGuideBox
data={{
keyInsensitive: interactionData.data.keyInsensitive,
isEthereum: false,
}}
isLedgerInteracting={isLedgerInteracting}
ledgerInteractingError={ledgerInteractingError}
isInternal={interactionData.isInternal}
Expand All @@ -616,6 +620,10 @@ export const SignStarknetTxView: FunctionComponent<{
}}
>
<AccountActivationModal
data={{
keyInsensitive: interactionData.data.keyInsensitive,
isEthereum: false,
}}
close={() => setIsAccountActivationModalOpen(false)}
onAccountDeployed={() => {
// account가 deploy 되었을때 gas simulator를 refresh한다.
Expand Down

0 comments on commit 9b6701a

Please sign in to comment.