Skip to content

Commit 4bf30dc

Browse files
committed
test: stx_signMessage
1 parent aa3d64a commit 4bf30dc

33 files changed

+2319
-1324
lines changed

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@
146146
"@hirosystems/token-metadata-api-client": "1.2.0",
147147
"@hookform/resolvers": "3.9.1",
148148
"@leather.io/analytics": "2.0.1",
149-
"@leather.io/bitcoin": "0.19.18",
149+
"@leather.io/bitcoin": "0.19.19",
150150
"@leather.io/constants": "0.15.5",
151-
"@leather.io/crypto": "1.6.34",
151+
"@leather.io/crypto": "1.6.35",
152152
"@leather.io/models": "0.25.1",
153-
"@leather.io/query": "2.26.19",
154-
"@leather.io/stacks": "1.5.19",
155-
"@leather.io/tokens": "0.12.10",
156-
"@leather.io/ui": "1.48.2",
157-
"@leather.io/utils": "0.25.1",
153+
"@leather.io/query": "2.26.21",
154+
"@leather.io/stacks": "1.5.20",
155+
"@leather.io/tokens": "0.12.11",
156+
"@leather.io/ui": "1.48.3",
157+
"@leather.io/utils": "0.25.2",
158158
"@ledgerhq/hw-transport-webusb": "6.27.19",
159159
"@noble/hashes": "1.5.0",
160160
"@noble/secp256k1": "2.1.0",
@@ -173,7 +173,7 @@
173173
"@sentry/tracing": "7.106.0",
174174
"@stacks/auth": "7.0.2",
175175
"@stacks/common": "7.0.2",
176-
"@stacks/connect": "7.4.0",
176+
"@stacks/connect-jwt": "npm:@stacks/connect@7.4.0",
177177
"@stacks/encryption": "7.0.2",
178178
"@stacks/network": "7.0.2",
179179
"@stacks/network-v6": "npm:@stacks/[email protected]",
@@ -266,20 +266,20 @@
266266
"@actions/core": "1.10.1",
267267
"@chromatic-com/storybook": "3.2.2",
268268
"@leather.io/eslint-config": "0.7.0",
269-
"@leather.io/panda-preset": " 0.8.9",
269+
"@leather.io/panda-preset": "0.8.10",
270270
"@leather.io/prettier-config": "0.6.0",
271-
"@leather.io/rpc": "2.5.5",
271+
"@leather.io/rpc": "2.5.6",
272272
"@ls-lint/ls-lint": "2.2.3",
273273
"@mdx-js/loader": "3.0.0",
274274
"@pandacss/dev": "0.46.1",
275-
"@playwright/test": "1.48.2",
275+
"@playwright/test": "1.50.1",
276276
"@pmmmwh/react-refresh-webpack-plugin": "0.5.13",
277277
"@redux-devtools/cli": "4.0.0",
278278
"@redux-devtools/remote": "0.9.3",
279279
"@schemastore/web-manifest": "0.0.6",
280280
"@sentry/react": "8.26.0",
281281
"@sentry/webpack-plugin": "2.17.0",
282-
"@stacks/connect-react": "22.2.0",
282+
"@stacks/connect-react-jwt": "npm:@stacks/connect-react@22.2.0",
283283
"@stacks/stacks-blockchain-api-types": "7.8.2",
284284
"@storybook/addon-docs": "8.4.4",
285285
"@storybook/addon-essentials": "8.4.4",

pnpm-lock.yaml

Lines changed: 2120 additions & 1265 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/common/psbt/requests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { TransactionInput } from '@scure/btc-signer/psbt';
2-
import { PsbtPayload } from '@stacks/connect';
2+
import { PsbtPayload } from '@stacks/connect-jwt';
33
import { decodeToken } from 'jsontokens';
44

55
import type { Money } from '@leather.io/models';

src/app/common/publish-subscribe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Transaction } from '@scure/btc-signer';
2-
import type { SignatureData } from '@stacks/connect';
2+
import type { SignatureData } from '@stacks/connect-jwt';
33
import type { StacksTransactionWire } from '@stacks/transactions';
44
import type { StacksTransaction } from '@stacks/transactions-v6';
55

src/app/features/ledger/flows/stacks-message-signing/stacks-message-signing-event-listeners.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { SignatureData } from '@stacks/connect-jwt';
12
import isEqual from 'lodash.isequal';
23

34
import type { UnsignedMessage } from '@shared/signature/signature-types';
@@ -6,7 +7,7 @@ import { GlobalAppEvents, appEvents } from '@app/common/publish-subscribe';
67

78
export async function listenForStacksMessageSigning(
89
unsignedMessage: UnsignedMessage
9-
): Promise<any> {
10+
): Promise<SignatureData> {
1011
return new Promise((resolve, reject) => {
1112
function stacksMessageSignedHandler(msg: GlobalAppEvents['ledgerStacksMessageSigned']) {
1213
if (isEqual(msg.unsignedMessage, unsignedMessage)) {

src/app/features/stacks-message-signer/stacks-message-signing.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export function StacksMessageSigning({
6363
return (
6464
<MessageSigningRequestLayout>
6565
<MessageSigningHeader name={origin} origin={origin} />
66-
6766
{isUtf8MessageType(messageType) && payload.messageType === 'utf8' && (
6867
<StacksSignatureRequestMessageContent
6968
isLoading={isLoading}

src/app/features/stacks-message-signer/stacks-message-signing.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { createDelay } from '@shared/utils';
1010

1111
import { useCurrentStacksAccount } from '@app/store/accounts/blockchain/stacks/stacks-account.hooks';
1212

13-
export const improveUxWithShortDelayAsStacksSigningIsSoFast = createDelay(1000);
13+
export const improveUxWithShortDelayAsStacksSigningIsSoFast = createDelay(600);
1414

1515
export function useMessageSignerStacksSoftwareWallet() {
1616
const account = useCurrentStacksAccount();

src/app/features/stacks-message-signer/use-sign-stacks-message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState } from 'react';
22

3-
import { SignatureData } from '@stacks/connect';
3+
import { SignatureData } from '@stacks/connect-jwt';
44

55
import { logger } from '@shared/logger';
66
import { UnsignedMessage } from '@shared/signature/signature-types';

src/app/pages/rpc-sign-stacks-message/use-rpc-sign-stacks-message.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export function useRpcStacksMessagePayload() {
4545
appName,
4646
} satisfies Utf8Payload;
4747
}
48+
4849
if (isStructuredMessageType(messageType)) {
4950
if (!domain) return null;
5051

@@ -96,7 +97,10 @@ export function useRpcSignStacksMessage() {
9697
tabId,
9798
makeRpcSuccessResponse('stx_signMessage', {
9899
id: requestId,
99-
result: { signature: messageSignature.signature },
100+
result: {
101+
signature: messageSignature.signature,
102+
publicKey: messageSignature.publicKey,
103+
},
100104
})
101105
);
102106
closeWindow();

src/app/pages/swap/providers/use-stacks-swap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useCallback } from 'react';
22
import { useNavigate } from 'react-router-dom';
33

44
import { bytesToHex } from '@stacks/common';
5-
import { type ContractCallPayload, TransactionTypes } from '@stacks/connect';
5+
import { type ContractCallPayload, TransactionTypes } from '@stacks/connect-jwt';
66
import { PostConditionMode } from '@stacks/transactions';
77
import { serializeCV } from '@stacks/transactions-v6';
88
import type { RouteQuote } from 'bitflow-sdk';

0 commit comments

Comments
 (0)