Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 21 additions & 27 deletions apps/appkit-minter/e2e/wallet/DemoWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,26 @@ export class DemoWallet extends WalletApp {
throw new Error('[importWallet] mnemonic is required setup WALLET_MNEMONIC');
}
const app = await this.open();

// Welcome → "Add an existing wallet" → "Recovery phrase"
await app.getByTestId('welcome-add-existing').click();
await app.getByTestId('add-wallet-import').click();

// Setup password
await app.getByTestId('title').filter({ hasText: 'Setup Password', visible: true });
await app.getByTestId('subtitle').filter({ hasText: 'Create Password', visible: true });
await app.getByTestId('password').fill(this.password);
await app.getByTestId('password-confirm').fill(this.password);
await app.getByTestId('password-submit').click();

// Navigate to Import tab
await app.getByTestId('title').filter({ hasText: 'Setup Wallet' }).waitFor({ state: 'visible' });
await app.getByTestId('tab-import').click();
await app.getByTestId('subtitle').filter({ hasText: 'Import Wallet', visible: true });

// Select mainnet
// Import wallet screen: select mainnet, paste the phrase, continue
await app.getByTestId('network-select-mainnet').click();

// Paste mnemonic using clipboard
await app.evaluate(async (m) => {
await navigator.clipboard.writeText(m);
}, mnemonic);
await app.getByTestId('paste-mnemonic').click();

// Import wallet
await app.getByTestId('import-wallet-process').click();
await app.getByTestId('title').filter({ hasText: 'TON Wallet' }).waitFor({ state: 'attached' });

// Wait for the dashboard (the settings button only exists there)
await app.getByTestId('wallet-menu').waitFor({ state: 'visible' });

// Disable auto-lock and hold-to-sign for e2e tests
await app.getByTestId('wallet-menu').click();
Expand All @@ -64,6 +60,8 @@ export class DemoWallet extends WalletApp {
async connectBy(url: string, shouldSkipConnect: boolean = false, confirm: boolean = true): Promise<void> {
const app = await this.open();
await delay(500);
// Open the "Connect to dApp" modal, then paste the TON Connect link.
await app.getByTestId('connect-dapp-button').click();
await app.getByTestId('tonconnect-url').fill(url);
await app.getByTestId('tonconnect-process').click();

Expand All @@ -79,22 +77,22 @@ export class DemoWallet extends WalletApp {
return;
}

const modal = app.getByTestId('request').filter({ hasText: 'Connect Request' });
const modal = app.getByTestId('connect-request');
await modal.waitFor({ state: 'visible' });
const chose = app.getByTestId(confirm ? 'connect-approve' : 'connect-reject');

await chose.waitFor({ state: 'attached' });
await chose.waitFor({ state: 'visible' });
await chose.click();
await modal.waitFor({ state: 'detached' });
await this.close();
}

async signData(confirm: boolean = true): Promise<void> {
const app = await this.open();
const modal = app.getByTestId('request').filter({ hasText: 'Sign Data Request' });
const modal = app.getByTestId('sign-data-request');
await modal.waitFor({ state: 'visible' });
const chose = app.getByTestId(confirm ? 'sign-data-approve' : 'sign-data-reject');
await chose.waitFor({ state: 'attached' });
await chose.waitFor({ state: 'visible' });
await chose.click();
await modal.waitFor({ state: 'detached' });
await this.close();
Expand All @@ -110,10 +108,10 @@ export class DemoWallet extends WalletApp {

async accept(confirm: boolean = true): Promise<void> {
const app = await this.open();
const modal = app.getByTestId('request').filter({ hasText: 'Transaction Request' });
const modal = app.getByTestId('transaction-request');
await modal.waitFor({ state: 'visible' });
const chose = app.getByTestId(confirm ? 'send-transaction-approve' : 'send-transaction-reject');
await chose.waitFor({ state: 'attached' });
await chose.waitFor({ state: 'visible' });
await chose.click();
await modal.waitFor({ state: 'detached' });
await this.close();
Expand Down Expand Up @@ -157,19 +155,15 @@ export class DemoWallet extends WalletApp {
await app.getByTestId('use-my-address').click();

// Fill in amount
await app.getByTestId('amount-input').fill(amount);
await app.getByTestId('send-amount-input').fill(amount);

// Click send button
await app.getByTestId('send-submit').click();

// Wait for transaction request modal
const modal = app.getByTestId('request').filter({ hasText: 'Transaction Request' });
await modal.waitFor({ state: 'visible' });

// Approve or reject
// Wait for the transaction request modal (anchored on its type-specific action button)
const chose = app.getByTestId(confirm ? 'send-transaction-approve' : 'send-transaction-reject');
await chose.waitFor({ state: 'attached' });
await chose.waitFor({ state: 'visible' });
await chose.click();
await modal.waitFor({ state: 'detached' });
await chose.waitFor({ state: 'detached' });
}
}
14 changes: 7 additions & 7 deletions apps/appkit-minter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@radix-ui/react-slot": "1.2.4",
"@radix-ui/react-tooltip": "1.2.8",
"@ston-fi/omniston-sdk": "^0.7.9",
"@tailwindcss/vite": "^4.3.0",
"@tailwindcss/vite": "^4.3.1",
"@tanstack/react-query": "catalog:",
"@ton/appkit": "workspace:*",
"@ton/appkit-react": "workspace:*",
Expand All @@ -39,20 +39,20 @@
"radix-ui": "^1.4.3",
"react": "catalog:",
"react-dom": "catalog:",
"react-router-dom": "^7.15.1",
"react-router-dom": "^7.17.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.0",
"tailwindcss": "^4.3.1",
"tw-animate-css": "^1.4.0",
"zustand": "^5.0.13"
"zustand": "^5.0.14"
},
"devDependencies": {
"@playwright/test": "^1.59.1",
"@playwright/test": "^1.60.0",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitejs/plugin-react": "^6.0.1",
"allure-js-commons": "^3.7.1",
"allure-playwright": "^3.7.1",
"allure-js-commons": "^3.10.0",
"allure-playwright": "^3.10.0",
"dotenv": "^17.4.2",
"typescript": "catalog:",
"vite": "catalog:",
Expand Down
18 changes: 9 additions & 9 deletions apps/demo-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
"@radix-ui/react-popover": "1.1.15",
"@radix-ui/react-select": "2.2.6",
"@scure/bip39": "^2.2.0",
"@tailwindcss/vite": "^4.3.0",
"@tailwindcss/vite": "^4.3.1",
"@telegram-apps/sdk": "^3.11.8",
"@ton/core": "catalog:",
"@ton/crypto": "catalog:",
"@ton/walletkit": "workspace:*",
"@truecarry/vite-plugin-web-extension": "^4.5.1",
"@truecarry/vite-plugin-web-extension": "^4.5.2",
"@truecarry/webext-bridge": "^6.0.2",
"buffer": "catalog:",
"class-variance-authority": "^0.7.1",
Expand All @@ -49,24 +49,24 @@
"qr-code-styling": "^1.9.2",
"react": "catalog:",
"react-dom": "catalog:",
"react-router-dom": "^7.15.1",
"react-router-dom": "^7.17.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.0",
"tailwindcss": "^4.3.1",
"tailwindcss-animate": "^1.0.7",
"tw-animate-css": "^1.4.0",
"vaul": "^1.1.2",
"zustand": "^5.0.13"
"zustand": "^5.0.14"
},
"devDependencies": {
"@playwright/test": "^1.59.1",
"@types/chrome": "^0.1.40",
"@playwright/test": "^1.60.0",
"@types/chrome": "^0.1.43",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@types/webextension-polyfill": "^0.12.4",
"@vitejs/plugin-react": "^6.0.1",
"allure-js-commons": "^3.7.1",
"allure-playwright": "^3.7.1",
"allure-js-commons": "^3.10.0",
"allure-playwright": "^3.10.0",
"cross-env": "^10.1.0",
"dotenv": "^17.4.2",
"typescript": "catalog:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
*/

import { useEffect, useState } from 'react';
import { useEffect, useMemo, useState } from 'react';
import type { Address } from '@ton/core';
import type { JettonInfo } from '@ton/walletkit';
import { getChainNetwork, useWalletKit, useWalletStore } from '@demo/wallet-core';
Expand Down Expand Up @@ -46,7 +46,7 @@ export function useJettonInfo(tokenAddress: Address | string | null | undefined)
const walletKit = useWalletKit();
const network = useActiveWalletNetwork();
const [tokenInfo, setTokenInfo] = useState<TokenInfo | null>(null);
const chainNetwork = getChainNetwork(network);
const chainNetwork = useMemo(() => getChainNetwork(network), [network]);

useEffect(() => {
if (!tokenAddress) {
Expand Down
8 changes: 4 additions & 4 deletions demo/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
"dotenv": "^17.4.2",
"react": "catalog:",
"react-dom": "catalog:",
"tsx": "^4.22.3",
"tsx": "^4.22.4",
"typescript": "catalog:"
},
"devDependencies": {
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.2",
"@vitest/coverage-v8": "^4.1.7",
"happy-dom": "^20.8.9",
"vitest": "^4.1.4"
"@vitest/coverage-v8": "^4.1.8",
"happy-dom": "^20.10.3",
"vitest": "^4.1.8"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-license-header": "^0.9.0",
"globals": "^17.5.0",
"prettier": "^3.8.3",
"prettier": "^3.8.4",
"rimraf": "catalog:",
"turbo": "2.9.14"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/appkit-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@storybook/react": "10.4.1",
"@storybook/react-vite": "10.4.1",
"@storybook/test": "^8.6.15",
"@tanstack/react-query": "catalog:",
"@tanstack/react-query": "^5.101.0",
"@tonconnect/ui-react": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
Expand Down
8 changes: 4 additions & 4 deletions packages/appkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
"@tanstack/query-core": ">=5.0.0",
"@ton/core": "^0.62.0 || ^0.63.0",
"@ton/crypto": "^3.3.0",
"@tonconnect/ui": ">=3.0.0",
"@tonconnect/sdk": ">=4.0.0"
"@tonconnect/sdk": ">=4.0.0",
"@tonconnect/ui": ">=3.0.0"
},
"peerDependenciesMeta": {
"@tonconnect/ui": {
Expand All @@ -129,10 +129,10 @@
"license": "ISC",
"packageManager": "pnpm@10.15.0",
"devDependencies": {
"@tanstack/query-core": "catalog:",
"@tanstack/query-core": "^5.101.0",
"@ton/core": "catalog:",
"@tonconnect/ui": "catalog:",
"typescript": "catalog:",
"vitest": "^4.1.4"
"vitest": "^4.1.8"
}
}
6 changes: 3 additions & 3 deletions packages/create-ton-appkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"clean": "rm -rf dist node_modules"
},
"dependencies": {
"@clack/prompts": "^1.5.0",
"@clack/prompts": "^1.5.1",
"mri": "^1.2.0"
},
"devDependencies": {
"@types/node": "^25.9.1",
"typescript": "~6.0.2"
"@types/node": "^25.9.3",
"typescript": "~6.0.3"
}
}
8 changes: 4 additions & 4 deletions packages/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@ton/core": "catalog:",
"@ton/crypto": "catalog:",
"@ton/walletkit": "workspace:*",
"https-proxy-agent": "^9.0.0",
"https-proxy-agent": "^9.1.0",
"undici": "8.0.2",
"ws": "^8.20.0",
"zod": "^3.25.76"
Expand All @@ -84,13 +84,13 @@
"@modelcontextprotocol/sdk": "^1.25.1"
},
"devDependencies": {
"@types/node": "^25.6.0",
"@types/node": "^25.9.3",
"@types/ws": "^8.18.1",
"@vitest/coverage-v8": "^4.1.7",
"@vitest/coverage-v8": "^4.1.8",
"rimraf": "catalog:",
"rolldown": "1.0.2",
"typescript": "catalog:",
"vitest": "^4.1.4"
"vitest": "^4.1.8"
},
"engines": {
"node": ">=18.0.0"
Expand Down
10 changes: 5 additions & 5 deletions packages/walletkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@
"@stryker-mutator/core": "^9.6.1",
"@ton/core": "catalog:",
"@ton/crypto": "catalog:",
"@types/chrome": "^0.1.40",
"@types/chrome": "^0.1.43",
"@types/jest": "^30.0.0",
"@types/webextension-polyfill": "^0.12.4",
"@vitest/coverage-v8": "^4.1.7",
"@vitest/ui": "^4.1.4",
"@vitest/coverage-v8": "^4.1.8",
"@vitest/ui": "^4.1.8",
"chalk": "^5.6.2",
"dotenv": "^17.4.2",
"jest": "^30.3.0",
Expand All @@ -161,10 +161,10 @@
"ts-jest": "^29.4.9",
"ts-json-schema-generator": "^2.4.0",
"ts-node": "^10.9.2",
"tsx": "^4.22.3",
"tsx": "^4.22.4",
"typescript": "catalog:",
"vite": "catalog:",
"vite-bundle-analyzer": "^1.3.7",
"vitest": "^4.1.4"
"vitest": "^4.1.8"
}
}
Loading
Loading