@@ -14,6 +14,7 @@ import { getAssociatedTokenAddress, NATIVE_MINT } from '@solana/spl-token';
1414import { ENVIRONMENT , HOST_ATA } from 'common/config' ;
1515import { sendAndConfirmStrategy } from 'components/TransactionTakeover/util' ;
1616import { WalletContextState } from '@solana/wallet-adapter-react' ;
17+ import { Wallet } from '@coral-xyz/anchor' ;
1718
1819const SOL_PADDING_FOR_RENT_AND_FEE = 0.02 ;
1920
@@ -28,7 +29,7 @@ export function sufficientSOLForTransaction(wallet: WalletType) {
2829export const supplyConfigs = {
2930 action : async (
3031 value : string ,
31- publicKey : string ,
32+ wallet : Wallet ,
3233 pool : PoolType ,
3334 selectedReserve : SelectedReserveType ,
3435 connection : Connection ,
@@ -45,8 +46,10 @@ export const supplyConfigs = {
4546 selectedReserve ,
4647 connection ,
4748 value ,
48- new PublicKey ( publicKey ) ,
49- ENVIRONMENT ,
49+ wallet ,
50+ {
51+ environment : ENVIRONMENT ,
52+ }
5053 ) ;
5154
5255 return sendAndConfirmStrategy (
@@ -158,7 +161,7 @@ export const supplyConfigs = {
158161export const borrowConfigs = {
159162 action : async (
160163 value : string ,
161- publicKey : string ,
164+ wallet : Wallet ,
162165 pool : PoolType ,
163166 selectedReserve : SelectedReserveType ,
164167 connection : Connection ,
@@ -191,10 +194,11 @@ export const borrowConfigs = {
191194 selectedReserve ,
192195 connection ,
193196 value ,
194- new PublicKey ( publicKey ) ,
195- ENVIRONMENT ,
196- undefined ,
197- hostAta ,
197+ wallet ,
198+ {
199+ environment : ENVIRONMENT ,
200+ hostAta,
201+ }
198202 ) ;
199203
200204 return sendAndConfirmStrategy (
@@ -359,7 +363,7 @@ export const borrowConfigs = {
359363export const withdrawConfigs = {
360364 action : async (
361365 value : string ,
362- publicKey : string ,
366+ wallet : Wallet ,
363367 pool : PoolType ,
364368 selectedReserve : SelectedReserveType ,
365369 connection : Connection ,
@@ -376,8 +380,10 @@ export const withdrawConfigs = {
376380 selectedReserve ,
377381 connection ,
378382 value ,
379- new PublicKey ( publicKey ) ,
380- ENVIRONMENT ,
383+ wallet ,
384+ {
385+ environment : ENVIRONMENT ,
386+ }
381387 ) ;
382388
383389 return sendAndConfirmStrategy (
@@ -552,7 +558,7 @@ export const withdrawConfigs = {
552558export const repayConfigs = {
553559 action : async (
554560 value : string ,
555- publicKey : string ,
561+ wallet : Wallet ,
556562 pool : PoolType ,
557563 selectedReserve : SelectedReserveType ,
558564 connection : Connection ,
@@ -569,8 +575,10 @@ export const repayConfigs = {
569575 selectedReserve ,
570576 connection ,
571577 value ,
572- new PublicKey ( publicKey ) ,
573- ENVIRONMENT ,
578+ wallet ,
579+ {
580+ environment : ENVIRONMENT ,
581+ } ,
574582 ) ;
575583
576584 return sendAndConfirmStrategy (
0 commit comments