Skip to content

Commit

Permalink
chores: Rename livenet to mainnet (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Jul 18, 2024
1 parent 534dd90 commit f30b714
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

const router = express.Router();

async function getSpaceNetwork(space, env = 'livenet') {
async function getSpaceNetwork(space, env = 'mainnet') {
const snapshotHubUrl = process.env.HUB_URL || constants[env].api;
const {
space: { network }
Expand Down Expand Up @@ -99,8 +99,8 @@ router.post('/', async (req, res) => {

try {
const msgHash = snapshot.utils.getHash(req.body.data);
const env = 'livenet';
let network = env === 'livenet' ? '1' : '5';
const env = 'mainnet';
let network = env === 'mainnet' ? '1' : '5';
if (!req.body.data.types.Space && !msg.settings)
network = await getSpaceNetwork(msg.space, env);

Expand Down
2 changes: 1 addition & 1 deletion src/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const errorMessagesWhitelist = [
'unable to fetch block'
];

async function send(body, env = 'livenet') {
async function send(body, env = 'mainnet') {
const url = process.env.SEQUENCER_URL || constants[env].ingestor;
const init = {
method: 'POST',
Expand Down
2 changes: 1 addition & 1 deletion src/constants.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"livenet": {
"mainnet": {
"ingestor": "https://seq.snapshot.org",
"api": "https://hub.snapshot.org/graphql"
},
Expand Down

0 comments on commit f30b714

Please sign in to comment.