From b05cf394261a9931fd19f9fc0b2a142b3efc58d3 Mon Sep 17 00:00:00 2001 From: sven Tan Date: Wed, 4 Dec 2024 10:41:06 +0800 Subject: [PATCH] Revert "fix sdk-kti e2e test" This reverts commit 226a5fccdb90e37537b22113ab6bcd569c080c48. --- .../test/case/use-default-client.test.tsx | 4 ++-- .../rooch-sdk-kit/test/mocks/mock-wallet.ts | 17 ++--------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/sdk/typescript/rooch-sdk-kit/test/case/use-default-client.test.tsx b/sdk/typescript/rooch-sdk-kit/test/case/use-default-client.test.tsx index 0d3022b65c..8cda910123 100644 --- a/sdk/typescript/rooch-sdk-kit/test/case/use-default-client.test.tsx +++ b/sdk/typescript/rooch-sdk-kit/test/case/use-default-client.test.tsx @@ -17,7 +17,7 @@ import { useConnectWallet, useCreateSessionKey, useCurrentSession, - useSessions, + useSession, } from '../../src/index.js' describe('useDefaultClient', () => { @@ -38,7 +38,7 @@ describe('useDefaultClient', () => { function useTestHook() { const { mutateAsync: connectWallet } = useConnectWallet() const { mutateAsync: createSessionKey } = useCreateSessionKey() - const sessions = useSessions() + const sessions = useSession() const currentSession = useCurrentSession() const networks = { test: { url: 'http://localhost:6767' } } const defaultClient = useDefaultClient({ currentNetwork: 'test', networks }) diff --git a/sdk/typescript/rooch-sdk-kit/test/mocks/mock-wallet.ts b/sdk/typescript/rooch-sdk-kit/test/mocks/mock-wallet.ts index fa77a7d1e5..64567b48cc 100644 --- a/sdk/typescript/rooch-sdk-kit/test/mocks/mock-wallet.ts +++ b/sdk/typescript/rooch-sdk-kit/test/mocks/mock-wallet.ts @@ -18,7 +18,6 @@ import { import { SupportChain } from '../../src/feature/index.js' import { Wallet } from '../../src/wellet/wallet.js' import { Mock, vi } from 'vitest' -import { WalletNetworkType } from '../../src/index.js' export class MockBitcoinWallet extends Wallet { private kp: Keypair @@ -56,7 +55,7 @@ export class MockBitcoinWallet extends Wallet { return 'mock' } - getNetwork(): WalletNetworkType { + getNetwork(): string { return 'testnet' } @@ -68,7 +67,7 @@ export class MockBitcoinWallet extends Wallet { return this.kp.getRoochAddress() } - getSupportNetworks(): WalletNetworkType[] { + getSupportNetworks(): string[] { return ['testnet', 'livenet'] } @@ -112,16 +111,4 @@ export class MockBitcoinWallet extends Wallet { getInstallUrl(): string { return '' } - - getBalance(): Promise<{ confirmed: number; unconfirmed: number; total: string }> { - return Promise.resolve({ confirmed: 0, total: '', unconfirmed: 0 }) - } - - sendBtc(_: { - toAddress: string - satoshis: number - options?: { feeRate: number } - }): Promise { - return Promise.resolve('') - } }