@@ -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' ;
@@ -365,7 +366,7 @@ export default function Profile() {
365366 } ;
366367 try {
367368 const response = await axios . post (
368- '/api/v1/tx/programmable-token/transfer' ,
369+ getApiUrl ( '/api/v1/tx/programmable-token/transfer' ) ,
369370 requestData ,
370371 {
371372 headers : {
@@ -448,7 +449,7 @@ export default function Profile() {
448449 setIsRegistering ( true ) ;
449450 changeAlertInfo ( { severity : 'info' , message : 'Preparing registration transaction…' , open : true , link : '' } ) ;
450451 const response = await axios . post (
451- '/api/v1/tx/programmable-token/register-transfer-scripts' ,
452+ getApiUrl ( '/api/v1/tx/programmable-token/register-transfer-scripts' ) ,
452453 { issuer : issuerAddress } ,
453454 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
454455 ) ;
@@ -502,7 +503,7 @@ export default function Profile() {
502503 setIsInitializingBlacklist ( true ) ;
503504 changeAlertInfo ( { severity : 'info' , message : 'Preparing blacklist initialisation transaction…' , open : true , link : '' } ) ;
504505 const response = await axios . post (
505- '/api/v1/tx/programmable-token/blacklist-init' ,
506+ getApiUrl ( '/api/v1/tx/programmable-token/blacklist-init' ) ,
506507 { issuer : issuerAddress } ,
507508 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
508509 ) ;
@@ -595,7 +596,7 @@ export default function Profile() {
595596 setIsUserMinting ( true ) ;
596597 try {
597598 const response = await axios . post (
598- '/api/v1/tx/programmable-token/issue' ,
599+ getApiUrl ( '/api/v1/tx/programmable-token/issue' ) ,
599600 requestData ,
600601 {
601602 headers : { 'Content-Type' : 'application/json;charset=utf-8' }
@@ -641,7 +642,7 @@ export default function Profile() {
641642 setIsUserFreezing ( true ) ;
642643 try {
643644 const response = await axios . post (
644- '/api/v1/tx/programmable-token/blacklist' ,
645+ getApiUrl ( '/api/v1/tx/programmable-token/blacklist' ) ,
645646 requestData ,
646647 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
647648 ) ;
@@ -694,7 +695,7 @@ export default function Profile() {
694695 setIsUserUnfreezing ( true ) ;
695696 try {
696697 const response = await axios . post (
697- '/api/v1/tx/programmable-token/unblacklist' ,
698+ getApiUrl ( '/api/v1/tx/programmable-token/unblacklist' ) ,
698699 requestData ,
699700 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
700701 ) ;
@@ -747,7 +748,7 @@ export default function Profile() {
747748 setIsUserSeizing ( true ) ;
748749 try {
749750 const response = await axios . post (
750- '/api/v1/tx/programmable-token/seize' ,
751+ getApiUrl ( '/api/v1/tx/programmable-token/seize' ) ,
751752 requestData ,
752753 { headers : { 'Content-Type' : 'application/json;charset=utf-8' } }
753754 ) ;
0 commit comments