File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1927,7 +1927,11 @@ fn kamino_deposit_or_withdraw(
1927
1927
) ;
1928
1928
1929
1929
if reserve_farm_state != Pubkey :: default ( ) {
1930
- if rpc_client. get_balance ( & obligation_farm_user_state) ? == 0 {
1930
+ if account_data_cache
1931
+ . get ( rpc_client, obligation_farm_user_state) ?
1932
+ . 0
1933
+ . is_empty ( )
1934
+ {
1931
1935
return Err ( format ! ( "Manually deposit once into {pool} before using sys-lend" ) . into ( ) ) ;
1932
1936
}
1933
1937
instructions. push ( kamino_refresh_obligation_farms_for_reserve. clone ( ) ) ;
@@ -2283,10 +2287,11 @@ fn solend_deposit_or_withdraw(
2283
2287
2284
2288
let mut instructions = vec ! [ ] ;
2285
2289
2286
- if matches ! (
2287
- rpc_client. get_balance( & user_collateral_token_account) ,
2288
- Ok ( 0 )
2289
- ) {
2290
+ if account_data_cache
2291
+ . get ( rpc_client, user_collateral_token_account) ?
2292
+ . 0
2293
+ . is_empty ( )
2294
+ {
2290
2295
instructions. push (
2291
2296
spl_associated_token_account:: instruction:: create_associated_token_account (
2292
2297
& wallet_address,
You can’t perform that action at this time.
0 commit comments