Skip to content

Commit

Permalink
change IOTEX server URI (snapshot-labs#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
maswalker authored Sep 16, 2021
1 parent 1e77583 commit 02dff48
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/strategies/iotex-balance/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"decimals": 18
}
},
"network": "4690",
"network": "4689",
"addresses": [
"0x1904BFcb93EdC9BF961Eead2e5c0de81dCc1D37D",
"0x87Eea07540789af85B64947aEA21A3f00400B597"
"0x515c2c35c3ec82c30affc5ec06da9a30ef008741",
"0xa00744882684c3e4747faefd68d283ea44099d03"
],
"snapshot": 8947000
"snapshot": 13000000
}
]
4 changes: 2 additions & 2 deletions src/strategies/iotex-balance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ interface ApiReturn {
export const author = 'iotex';
export const version = '0.0.1';

const testNetUrl = 'https://testnet.iotexscout.io/apiproxy';
const mainNetUrl = 'https://iotexscout.io/apiproxy';
const testNetUrl = 'https://iotex-analyser-api-testnet.chainanalytics.org';
const mainNetUrl = 'https://iotex-analyser-api-mainnet.chainanalytics.org';

function getUrl(network) {
return network == 4689 ? mainNetUrl : testNetUrl;
Expand Down
6 changes: 3 additions & 3 deletions src/strategies/iotex-staked-balance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ interface ApiReturn {
export const author = 'iotex';
export const version = '0.0.1';

const testNetUrl = 'https://testnet.iotexscout.io/apiproxy';
const mainNetUrl = 'https://iotexscout.io/apiproxy';
const testNetUrl = 'https://iotex-analyser-api-testnet.chainanalytics.org';
const mainNetUrl = 'https://iotex-analyser-api-mainnet.chainanalytics.org';

function getUrl(network) {
return network == 4689 ? mainNetUrl : testNetUrl;
Expand All @@ -24,7 +24,7 @@ export async function strategy(
const height = typeof snapshot === 'number' ? snapshot : 10000000000;
const apiUrl = getUrl(network);
const response = await fetch(
`${apiUrl}/api.AccountVoteService.GetVoteByHeight`,
`${apiUrl}/api.StakingService.GetVoteByHeight`,
{
method: 'POST',
headers: {
Expand Down

0 comments on commit 02dff48

Please sign in to comment.