Skip to content

Commit

Permalink
move API urls to hiro
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudozach committed Oct 30, 2023
1 parent 9ccc32d commit a55226f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/actions/landingPageActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const getPairs = () => {

export const getLastSwap = async () => {
const contract = `SP2507VNQZC9VBXM7X7KB4SF4QJDJRSWHG4V39WPY.stxswap_v10`;
const url = `https://stacks-node-api.mainnet.stacks.co/extended/v1/address/${contract}/transactions_with_transfers`;
const url = `https://api.hiro.so/extended/v1/address/${contract}/transactions_with_transfers`;
let response = await axios.get(url);
const resultsarr = response.data.results;
let lastSwap = resultsarr.find(item => item.tx.tx_status === 'success');
Expand Down
4 changes: 2 additions & 2 deletions src/actions/refundActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {

let apiUrl = process.env.REACT_APP_STACKS_API;
if (stacksNetworkType === 'testnet') {
apiUrl = 'https://stacks-node-api.testnet.stacks.co';
apiUrl = 'https://api.testnet.hiro.so';
} else if (stacksNetworkType === 'mainnet') {
apiUrl = 'https://stacks-node-api.mainnet.stacks.co';
apiUrl = 'https://api.hiro.so';
}

const verifyRefundFile = (fileJSON, keys) => {
Expand Down
6 changes: 3 additions & 3 deletions src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ export const boltzOnion = process.env.REACT_APP_BOLTZ_ONION;
export const stacksNetworkType = process.env.REACT_APP_STACKS_NETWORK_TYPE;

export const coreApiUrl = () => {
let apiUrl = 'https://stacks-node-api.mainnet.stacks.co';
let apiUrl = 'https://api.hiro.so';
if (stacksNetworkType === 'mocknet') {
apiUrl = 'http://localhost:3999';
} else if (stacksNetworkType === 'testnet') {
apiUrl = 'https://stacks-node-api.testnet.stacks.co';
apiUrl = 'https://api.testnet.hiro.so';
} else if (stacksNetworkType === 'mainnet') {
apiUrl = 'https://stacks-node-api.mainnet.stacks.co';
apiUrl = 'https://api.hiro.so';
}
return apiUrl;
};
Expand Down
4 changes: 2 additions & 2 deletions src/views/refund/steps/InputDestinationAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ if (stacksNetworkType === 'mocknet') {
activeNetwork = mocknet;
} else if (stacksNetworkType === 'testnet') {
activeNetwork = testnet;
apiUrl = 'https://stacks-node-api.testnet.stacks.co';
apiUrl = 'https://api.testnet.hiro.so';
} else if (stacksNetworkType === 'mainnet') {
activeNetwork = mainnet;
apiUrl = 'https://stacks-node-api.mainnet.stacks.co';
apiUrl = 'https://api.hiro.so';
}

const InputDestinationAddressStyles = theme => ({
Expand Down

0 comments on commit a55226f

Please sign in to comment.