@@ -14,6 +14,7 @@ import { getAssociatedTokenAddress, NATIVE_MINT } from '@solana/spl-token';
14
14
import { ENVIRONMENT , HOST_ATA } from 'common/config' ;
15
15
import { sendAndConfirmStrategy } from 'components/TransactionTakeover/util' ;
16
16
import { WalletContextState } from '@solana/wallet-adapter-react' ;
17
+ import { Wallet } from '@coral-xyz/anchor' ;
17
18
18
19
const SOL_PADDING_FOR_RENT_AND_FEE = 0.02 ;
19
20
@@ -28,7 +29,7 @@ export function sufficientSOLForTransaction(wallet: WalletType) {
28
29
export const supplyConfigs = {
29
30
action : async (
30
31
value : string ,
31
- publicKey : string ,
32
+ wallet : Wallet ,
32
33
pool : PoolType ,
33
34
selectedReserve : SelectedReserveType ,
34
35
connection : Connection ,
@@ -45,8 +46,10 @@ export const supplyConfigs = {
45
46
selectedReserve ,
46
47
connection ,
47
48
value ,
48
- new PublicKey ( publicKey ) ,
49
- ENVIRONMENT ,
49
+ wallet ,
50
+ {
51
+ environment : ENVIRONMENT ,
52
+ }
50
53
) ;
51
54
52
55
return sendAndConfirmStrategy (
@@ -158,7 +161,7 @@ export const supplyConfigs = {
158
161
export const borrowConfigs = {
159
162
action : async (
160
163
value : string ,
161
- publicKey : string ,
164
+ wallet : Wallet ,
162
165
pool : PoolType ,
163
166
selectedReserve : SelectedReserveType ,
164
167
connection : Connection ,
@@ -191,10 +194,11 @@ export const borrowConfigs = {
191
194
selectedReserve ,
192
195
connection ,
193
196
value ,
194
- new PublicKey ( publicKey ) ,
195
- ENVIRONMENT ,
196
- undefined ,
197
- hostAta ,
197
+ wallet ,
198
+ {
199
+ environment : ENVIRONMENT ,
200
+ hostAta,
201
+ }
198
202
) ;
199
203
200
204
return sendAndConfirmStrategy (
@@ -359,7 +363,7 @@ export const borrowConfigs = {
359
363
export const withdrawConfigs = {
360
364
action : async (
361
365
value : string ,
362
- publicKey : string ,
366
+ wallet : Wallet ,
363
367
pool : PoolType ,
364
368
selectedReserve : SelectedReserveType ,
365
369
connection : Connection ,
@@ -376,8 +380,10 @@ export const withdrawConfigs = {
376
380
selectedReserve ,
377
381
connection ,
378
382
value ,
379
- new PublicKey ( publicKey ) ,
380
- ENVIRONMENT ,
383
+ wallet ,
384
+ {
385
+ environment : ENVIRONMENT ,
386
+ }
381
387
) ;
382
388
383
389
return sendAndConfirmStrategy (
@@ -552,7 +558,7 @@ export const withdrawConfigs = {
552
558
export const repayConfigs = {
553
559
action : async (
554
560
value : string ,
555
- publicKey : string ,
561
+ wallet : Wallet ,
556
562
pool : PoolType ,
557
563
selectedReserve : SelectedReserveType ,
558
564
connection : Connection ,
@@ -569,8 +575,10 @@ export const repayConfigs = {
569
575
selectedReserve ,
570
576
connection ,
571
577
value ,
572
- new PublicKey ( publicKey ) ,
573
- ENVIRONMENT ,
578
+ wallet ,
579
+ {
580
+ environment : ENVIRONMENT ,
581
+ } ,
574
582
) ;
575
583
576
584
return sendAndConfirmStrategy (
0 commit comments