22 ref , computed , useContext ,
33} from '@nuxtjs/composition-api' ;
44import { UseCurrency , UseCurrencyErrors } from '~/composables/useCurrency/useCurrency' ;
5- import { ComposableFunctionArgs } from '~/composables/types' ;
5+ import { ComposableFunctionArgs , CustomQuery } from '~/composables/types' ;
66import { Logger } from '~/helpers/logger' ;
77import { useConfigStore } from '~/stores/config' ;
88
@@ -13,7 +13,7 @@ const useCurrency = (): UseCurrency => {
1313 const configStore = useConfigStore ( ) ;
1414 const currency = computed ( ( ) => configStore . currency ) ;
1515
16- const load = async ( params ?: ComposableFunctionArgs < { } > ) => {
16+ const load = async ( params ?: ComposableFunctionArgs < CustomQuery > ) => {
1717 error . value . load = null ;
1818 loading . value = true ;
1919
@@ -32,14 +32,14 @@ const useCurrency = (): UseCurrency => {
3232 }
3333 } ;
3434
35- const change = async ( params : ComposableFunctionArgs < { id : string } > ) => {
35+ const change = ( params : ComposableFunctionArgs < { id : string } > ) => {
3636 error . value . change = null ;
3737 loading . value = true ;
3838
3939 Logger . debug ( 'useCurrency/change' ) ;
4040
4141 try {
42- await app . $vsf . $magento . config . state . setCurrency ( params . id ) ;
42+ app . $vsf . $magento . config . state . setCurrency ( params . id ) ;
4343 } catch ( err ) {
4444 Logger . debug ( '[ERROR] useCurrency/change' , err ) ;
4545 error . value . change = err ;
0 commit comments