v3.4.0: feat(#219) add support for account asset v3 REST endpoints

This commit is contained in:
tiagosiebler
2023-02-13 17:20:03 +00:00
parent 0c0900e608
commit 6fa204e8bd
11 changed files with 870 additions and 49 deletions

View File

@@ -15,10 +15,29 @@ import {
// return request;
// });
// axios.interceptors.response.use((response) => {
// console.log(new Date(), 'Response:', JSON.stringify(response, null, 2));
// return response;
// });
if (
typeof process === 'object' &&
typeof process.env === 'object' &&
process.env.BYBITTRACE
) {
axios.interceptors.response.use((response) => {
console.log(new Date(), 'Response:', {
request: {
url: response.config.url,
method: response.config.method,
data: response.config.data,
headers: response.config.headers,
},
response: {
status: response.status,
statusText: response.statusText,
headers: response.headers,
data: response.data,
},
});
return response;
});
}
interface SignedRequestContext {
timestamp?: number;