@@ -4,6 +4,7 @@ import React, { useContext, useEffect, useState, useMemo } from 'react';
44
55//Axios imports
66import axios from 'axios' ;
7+ import { getApiUrl } from '../utils/apiConfig' ;
78
89//Mui imports
910import { Box , Checkbox , CircularProgress , FormControl , FormControlLabel , InputLabel , MenuItem , Paper , Select , Typography } from '@mui/material' ;
@@ -356,7 +357,7 @@ export default function Profile() {
356357 } ;
357358 try {
358359 const response = await axios . post (
359- '/api/v1/tx/programmable-token/transfer' ,
360+ getApiUrl ( '/api/v1/tx/programmable-token/transfer' ) ,
360361 requestData ,
361362 {
362363 headers : {
@@ -430,7 +431,7 @@ export default function Profile() {
430431 setIsRegistering ( true ) ;
431432 changeAlertInfo ( { severity : 'info' , message : 'Preparing registration transaction…' , open : true , link : '' } ) ;
432433 const response = await axios . post (
433- '/api/v1/tx/programmable-token/register-transfer-scripts' ,
434+ getApiUrl ( '/api/v1/tx/programmable-token/register-transfer-scripts' ) ,
434435 { issuer : issuerAddress } ,
435436 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
436437 ) ;
@@ -484,7 +485,7 @@ export default function Profile() {
484485 setIsInitializingBlacklist ( true ) ;
485486 changeAlertInfo ( { severity : 'info' , message : 'Preparing blacklist initialisation transaction…' , open : true , link : '' } ) ;
486487 const response = await axios . post (
487- '/api/v1/tx/programmable-token/blacklist-init' ,
488+ getApiUrl ( '/api/v1/tx/programmable-token/blacklist-init' ) ,
488489 { issuer : issuerAddress } ,
489490 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
490491 ) ;
@@ -572,7 +573,7 @@ export default function Profile() {
572573 } ;
573574 try {
574575 const response = await axios . post (
575- '/api/v1/tx/programmable-token/issue' ,
576+ getApiUrl ( '/api/v1/tx/programmable-token/issue' ) ,
576577 requestData ,
577578 {
578579 headers : { 'Content-Type' : 'application/json;charset=utf-8' }
@@ -611,7 +612,7 @@ export default function Profile() {
611612 } ;
612613 try {
613614 const response = await axios . post (
614- '/api/v1/tx/programmable-token/blacklist' ,
615+ getApiUrl ( '/api/v1/tx/programmable-token/blacklist' ) ,
615616 requestData ,
616617 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
617618 ) ;
@@ -657,7 +658,7 @@ export default function Profile() {
657658 } ;
658659 try {
659660 const response = await axios . post (
660- '/api/v1/tx/programmable-token/unblacklist' ,
661+ getApiUrl ( '/api/v1/tx/programmable-token/unblacklist' ) ,
661662 requestData ,
662663 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
663664 ) ;
@@ -703,7 +704,7 @@ export default function Profile() {
703704 } ;
704705 try {
705706 const response = await axios . post (
706- '/api/v1/tx/programmable-token/seize' ,
707+ getApiUrl ( '/api/v1/tx/programmable-token/seize' ) ,
707708 requestData ,
708709 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
709710 ) ;
0 commit comments