Skip to content

Commit

Permalink
Revert "fix sdk-kti e2e test"
Browse files Browse the repository at this point in the history
This reverts commit 226a5fc.
  • Loading branch information
wow-sven committed Dec 4, 2024
1 parent f7f16d1 commit b05cf39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
useConnectWallet,
useCreateSessionKey,
useCurrentSession,
useSessions,
useSession,
} from '../../src/index.js'

describe('useDefaultClient', () => {
Expand All @@ -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 })
Expand Down
17 changes: 2 additions & 15 deletions sdk/typescript/rooch-sdk-kit/test/mocks/mock-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -56,7 +55,7 @@ export class MockBitcoinWallet extends Wallet {
return 'mock'
}

getNetwork(): WalletNetworkType {
getNetwork(): string {
return 'testnet'
}

Expand All @@ -68,7 +67,7 @@ export class MockBitcoinWallet extends Wallet {
return this.kp.getRoochAddress()
}

getSupportNetworks(): WalletNetworkType[] {
getSupportNetworks(): string[] {
return ['testnet', 'livenet']
}

Expand Down Expand Up @@ -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<string> {
return Promise.resolve('')
}
}

0 comments on commit b05cf39

Please sign in to comment.