@@ -6,9 +6,9 @@ import { ItemCardSkeleton } from '@/components/ItemCardSkeleton';
66import { MainSection } from '@/components/MainSection' ;
77import { NoResultText } from '@/components/NoResultText' ;
88import { SectionHeader } from '@/components/SectionHeader' ;
9- import { getStorePda } from '@/lib/pda' ;
109import { atomicToUsd , truncateAddress } from '@/lib/utils' ;
1110import { ItemsProvider , useItems } from '@/providers/ItemsProvider' ;
11+ import { useProgram } from '@/providers/ProgramProvider' ;
1212import { useShopper } from '@/providers/ShopperProvider' ;
1313import { StoresProvider , useStores } from '@/providers/StoresProvider' ;
1414import { useWallet } from '@jup-ag/wallet-adapter' ;
@@ -19,6 +19,7 @@ import { useMemo } from 'react';
1919
2020function Section ( ) {
2121 const { publicKey } = useWallet ( ) ;
22+ const { splurgeClient } = useProgram ( ) ;
2223 const { shopperData } = useShopper ( ) ;
2324 const { storesData, storesLoading } = useStores ( ) ;
2425 const { itemsData, itemsLoading } = useItems ( ) ;
@@ -29,12 +30,12 @@ function Section() {
2930 let filtered = itemsData . filter ( ( { inventoryCount } ) => inventoryCount > 0 ) ;
3031
3132 if ( publicKey ) {
32- const storePda = getStorePda ( publicKey ) ;
33+ const storePda = splurgeClient . getStorePda ( publicKey ) ;
3334 filtered = filtered . filter ( ( { store } ) => store !== storePda . toBase58 ( ) ) ;
3435 }
3536
3637 return filtered ;
37- } , [ itemsData , publicKey ] ) ;
38+ } , [ itemsData , publicKey , splurgeClient ] ) ;
3839
3940 return (
4041 < MainSection className = "flex-1" >
0 commit comments