Skip to content

Commit

Permalink
chore: disable truncateMiddle temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Sep 8, 2023
1 parent 056835d commit 47a45e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ChainID } from '@stacks/common';

import { StructuredMessageDataDomain } from '@shared/signature/signature-types';

import { getStructuredDataPayloadFromToken } from '@app/common/signature/requests';
import { NoFeesWarningRow } from '@app/components/no-fees-warning-row';
import { SignMessageActions } from '@app/features/message-signer/stacks-sign-message-action';
Expand All @@ -20,11 +22,14 @@ export function SignatureRequestStructuredDataContent({
const appName = signatureRequest.appDetails?.name;
return (
<>
<StructuredDataBox message={message} domain={domain} />
<StructuredDataBox message={message} domain={domain as StructuredMessageDataDomain} />
<NoFeesWarningRow chainId={network?.chainId ?? ChainID.Testnet} />
<SignMessageActions
isLoading={isLoading}
onSignMessageCancel={cancelMessageSigning}
// #4164 FIXME fix type error on domain below
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
onSignMessage={() => signMessage({ messageType: 'structured', message, domain })}
/>
<hr />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { useDrawers } from '@app/common/hooks/use-drawers';
import { useScrollLock } from '@app/common/hooks/use-scroll-lock';
import { stacksValue } from '@app/common/stacks-utils';
// PETE fix this now merging my PRs
import { truncateMiddle } from '@app/common/utils/stacks-ui';
// #4164 FIXME migrate truncateMiddle
// import { truncateMiddle } from '@app/common/utils/stacks-ui';
//FIXME - PETE rebase onto 1 PR soon to solve this
import { LeatherButton } from '@app/components/button/button';
import { SpaceBetween } from '@app/components/layout/space-between';
Expand Down Expand Up @@ -110,9 +111,11 @@ export const NoContractErrorMessage = memo(props => {
return (
<ErrorMessage
title="Contract not found"
body={`The contract (${truncateMiddle(pendingTransaction.contractAddress)}.${
pendingTransaction.contractName
}) that you are trying to call cannot be found on ${network.mode}.`}
// #4164 FIXME migrate truncateMiddle
body={`The contract (${pendingTransaction.contractAddress}.${pendingTransaction.contractName}) that you are trying to call cannot be found on ${network.mode}.`}
// body={`The contract (${truncateMiddle(pendingTransaction.contractAddress)}.${
// pendingTransaction.contractName
// }) that you are trying to call cannot be found on ${network.mode}.`}
{...props}
/>
);
Expand All @@ -126,9 +129,11 @@ export const IncorrectContractAddressMessage = memo(props => {
return (
<ErrorMessage
title="Invalid contract address"
body={`The contract address (${truncateMiddle(
pendingTransaction.contractAddress
)}) that you are trying to call is not a valid Stacks address.`}
// #4164 FIXME migrate truncateMiddle
body={`The contract address (${pendingTransaction.contractAddress}) that you are trying to call is not a valid Stacks address.`}
// body={`The contract address (${truncateMiddle(
// pendingTransaction.contractAddress
// )}) that you are trying to call is not a valid Stacks address.`}
{...props}
/>
);
Expand Down

0 comments on commit 47a45e2

Please sign in to comment.