@@ -11,11 +11,15 @@ import { queryKey } from './queryKey';
1111export function useNamesPurchaseMode ( ) {
1212 const { iotaNamesClient } = useIotaNamesClient ( ) ;
1313 const iotaClient = useIotaClient ( ) ;
14+ const packageId = iotaNamesClient . getPackage ( 'packageId' , 'v1' ) ;
15+ const paymentsPackageId = iotaNamesClient . getPackage ( 'paymentsPackageId' , 'v1' ) ;
16+ const auctionPackageId = iotaNamesClient . getPackage ( 'auctionPackageId' , 'v1' ) ;
17+ const iotaNamesObjectId = iotaNamesClient . getPackage ( 'iotaNamesObjectId' , 'v1' ) ;
1418
15- const authKeyType = `${ iotaNamesClient . config . packageId } ::iota_names::AuthKey` ;
19+ const authKeyType = `${ packageId } ::iota_names::AuthKey` ;
1620
17- const paymentType = `${ authKeyType } <${ iotaNamesClient . config . paymentsPackageId } ::payments::PaymentsAuth>` ;
18- const auctionType = `${ authKeyType } <${ iotaNamesClient . config . auctionPackageId } ::auction::AuctionAuth>` ;
21+ const paymentType = `${ authKeyType } <${ paymentsPackageId } ::payments::PaymentsAuth>` ;
22+ const auctionType = `${ authKeyType } <${ auctionPackageId } ::auction::AuctionAuth>` ;
1923
2024 return useQuery ( {
2125 // eslint-disable-next-line @tanstack/query/exhaustive-deps
@@ -26,7 +30,7 @@ export function useNamesPurchaseMode() {
2630 }
2731
2832 const { data : dynamicFields } = await iotaClient . getDynamicFields ( {
29- parentId : iotaNamesClient . config . iotaNamesObjectId ,
33+ parentId : iotaNamesObjectId ,
3034 } ) ;
3135
3236 const fieldTypes = dynamicFields . map ( ( field ) => field . name . type ) ;
0 commit comments