Skip to content

Commit

Permalink
fix: add position, token, url as env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed May 22, 2024
1 parent 66e9b44 commit 8fd62d5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion explorer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h1>Mercury layer lockbox status</h1>

<script>
// Specify the endpoint URL
const endpointUrl = 'https://api.mercurywallet.io/info/keylist';
const endpointUrl = 'https://api.mercurylayer.com/info/keylist';

// Function to fetch data from the specified endpoint
async function fetchData() {
Expand Down
2 changes: 1 addition & 1 deletion explorer/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
document.addEventListener('DOMContentLoaded', function () {
// Fetch JSON data
fetch('https://api.mercurywallet.io/info/keylist')
fetch('https://api.mercurylayer.com/info/keylist')
.then(response => response.json())
.then(data => {
// Display JSON data in a <pre> tag
Expand Down
2 changes: 1 addition & 1 deletion explorer/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ http {

server {
listen 0.0.0.0:80;
server_name api.mercurywallet.io;
server_name api.mercurylayer.com;

location / {
root /usr/share/nginx/html;
Expand Down
8 changes: 0 additions & 8 deletions keylistCron/send_commitment.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

# Fetch keylist JSON from the provided URL
KEYLIST_URL="http://45.76.136.11:8000/info/keylist"
KEYLIST_JSON=$(curl -sSL "$KEYLIST_URL" | jq -r '.list_keyinfo' | sed 's/"/\\"/g')

# Check if the GET request was successful
Expand All @@ -13,13 +12,6 @@ fi
# Calculate SHA256 hash of the keylist JSON
KEYLIST_HASH=$(echo "$KEYLIST_JSON" | sha256sum | awk '{print $1}')

# Define mainstay slot URL
MAINSTAY_URL="https://testnet.mainstay.xyz/ctrl/sendcommitment"

# Attestation data
POSITION="3"
TOKEN="0972e199-6cf8-4164-8445-235528b6afa5"

# Construct the POST request body
PAYLOAD="{
\"position\": \"$POSITION\",
Expand Down

0 comments on commit 8fd62d5

Please sign in to comment.