@@ -7,9 +7,6 @@ import { useViewsFlowContext } from '@providers/ViewFlowProvider';
7
7
import { Wallet } from '@lace/cardano' ;
8
8
import { withAddressBookContext } from '@src/features/address-book/context' ;
9
9
import { useWalletStore } from '@stores' ;
10
- import { exposeApi , RemoteApiPropertyType } from '@cardano-sdk/web-extension' ;
11
- import { DAPP_CHANNELS } from '@src/utils/constants' ;
12
- import { runtime } from 'webextension-polyfill' ;
13
10
import { useFetchCoinPrice , useChainHistoryProvider } from '@hooks' ;
14
11
import {
15
12
createTxInspector ,
@@ -21,11 +18,9 @@ import {
21
18
} from '@cardano-sdk/core' ;
22
19
import { createWalletAssetProvider } from '@cardano-sdk/wallet' ;
23
20
import { Skeleton } from 'antd' ;
24
- import type { UserPromptService } from '@lib/scripts/background/services' ;
25
- import { of , take } from 'rxjs' ;
26
21
27
22
import { useCurrencyStore , useAppSettingsContext } from '@providers' ;
28
- import { logger , signingCoordinator } from '@lib/wallet-api-ui' ;
23
+ import { logger } from '@lib/wallet-api-ui' ;
29
24
import { useComputeTxCollateral } from '@hooks/useComputeTxCollateral' ;
30
25
import { utxoAndBackendChainHistoryResolver } from '@src/utils/utxo-chain-history-resolver' ;
31
26
@@ -36,7 +31,7 @@ interface DappTransactionContainerProps {
36
31
export const DappTransactionContainer = withAddressBookContext (
37
32
( { errorMessage } : DappTransactionContainerProps ) : React . ReactElement => {
38
33
const {
39
- signTxRequest : { request : req , set : setSignTxRequest } ,
34
+ signTxRequest : { request : req } ,
40
35
dappInfo
41
36
} = useViewsFlowContext ( ) ;
42
37
@@ -78,30 +73,6 @@ export const DappTransactionContainer = withAddressBookContext(
78
73
const tx = useMemo ( ( ) => req ?. transaction . toCore ( ) , [ req ?. transaction ] ) ;
79
74
const txCollateral = useComputeTxCollateral ( walletState , tx ) ;
80
75
81
- useEffect ( ( ) => {
82
- const subscription = signingCoordinator . transactionWitnessRequest$ . pipe ( take ( 1 ) ) . subscribe ( async ( r ) => {
83
- setSignTxRequest ( r ) ;
84
- } ) ;
85
-
86
- const api = exposeApi < Pick < UserPromptService , 'readyToSignTx' > > (
87
- {
88
- api$ : of ( {
89
- async readyToSignTx ( ) : Promise < boolean > {
90
- return Promise . resolve ( true ) ;
91
- }
92
- } ) ,
93
- baseChannel : DAPP_CHANNELS . userPrompt ,
94
- properties : { readyToSignTx : RemoteApiPropertyType . MethodReturningPromise }
95
- } ,
96
- { logger : console , runtime }
97
- ) ;
98
-
99
- return ( ) => {
100
- subscription . unsubscribe ( ) ;
101
- api . shutdown ( ) ;
102
- } ;
103
- } , [ setSignTxRequest ] ) ;
104
-
105
76
const userAddresses = useMemo ( ( ) => walletInfo . addresses . map ( ( v ) => v . address ) , [ walletInfo . addresses ] ) ;
106
77
const userRewardAccounts = useObservable ( inMemoryWallet . delegation . rewardAccounts$ ) ;
107
78
const rewardAccountsAddresses = useMemo ( ( ) => userRewardAccounts ?. map ( ( key ) => key . address ) , [ userRewardAccounts ] ) ;
0 commit comments