File tree Expand file tree Collapse file tree
packages/apps/staking/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import api from '../utils/api';
33
44export const getKVStoreData = async (
55 address : string ,
6- chainId : number
6+ chainId : number ,
77) : Promise < IKVStore [ ] > => {
88 const response = await api . get ( `details/kvstore/${ address } ` , {
9- params : { chain_id : chainId } ,
9+ params : { chainId } ,
1010 } ) ;
1111
1212 // Validate if response is IKVStore[]
Original file line number Diff line number Diff line change 11import axios from 'axios' ;
2- import { CaseConverter } from './case-converter' ;
32
43const axiosInstance = axios . create ( {
54 baseURL : import . meta. env . VITE_APP_DASHBOARD_API_URL ,
65} ) ;
76
8- axiosInstance . interceptors . request . use (
9- ( config ) => {
10- if ( config . data ) {
11- config . data = CaseConverter . transformToSnakeCase ( config . data ) ;
12- }
13-
14- if ( config . params ) {
15- config . params = CaseConverter . transformToSnakeCase ( config . params ) ;
16- }
17-
18- return config ;
19- } ,
20- ( error ) => Promise . reject ( error )
21- ) ;
22-
23- axiosInstance . interceptors . response . use (
24- ( response ) => {
25- if ( response . data ) {
26- response . data = CaseConverter . transformToCamelCase ( response . data ) ;
27- }
28- return response ;
29- } ,
30- ( error ) => {
31- return Promise . reject ( error ) ;
32- }
33- ) ;
34-
357export default axiosInstance ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments