Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions harnesses/bridge-monitor/cmd/monitor/balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func indexAssets(result map[string]map[string]float64, resp *MobulaWalletRespons

// fetchWalletBalance fetches balance for a single wallet (all chains)
func (bc *BalanceChecker) fetchWalletBalance(address string) (*MobulaWalletResponse, error) {
url := fmt.Sprintf("https://api.mobula.io/api/1/wallet/portfolio?wallet=%s", address)
url := fmt.Sprintf("https://demo-api.mobula.io/api/1/wallet/portfolio?wallet=%s", address)

req, err := http.NewRequest("GET", url, nil)
if err != nil {
Expand Down Expand Up @@ -298,7 +298,7 @@ func (bc *BalanceChecker) fetchWalletBalance(address string) (*MobulaWalletRespo

// fetchWalletBalanceByChain fetches balance for a specific chain
func (bc *BalanceChecker) fetchWalletBalanceByChain(address, chain string) (*MobulaWalletResponse, error) {
url := fmt.Sprintf("https://api.mobula.io/api/1/wallet/portfolio?wallet=%s&blockchains=%s", address, chain)
url := fmt.Sprintf("https://demo-api.mobula.io/api/1/wallet/portfolio?wallet=%s&blockchains=%s", address, chain)

req, err := http.NewRequest("GET", url, nil)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions harnesses/bridge-monitor/cmd/monitor/mobula_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (m *MobulaBridge) GetQuote(originChain, originToken, destChain, destToken,
start := time.Now()

url := fmt.Sprintf(
"https://api.mobula.io/api/2/bridge/quote?originChainId=%s&originToken=%s&destinationChainId=%s&destinationToken=%s&amount=%s&walletAddress=%s&apiKey=%s",
"https://demo-api.mobula.io/api/2/bridge/quote?originChainId=%s&originToken=%s&destinationChainId=%s&destinationToken=%s&amount=%s&walletAddress=%s&apiKey=%s",
originChain, originToken, destChain, destToken,
strconv.FormatFloat(amount, 'f', -1, 64),
walletAddress, m.apiKey,
Expand Down Expand Up @@ -135,7 +135,7 @@ func (m *MobulaBridge) GetQuote(originChain, originToken, destChain, destToken,
}

func (m *MobulaBridge) GetStatus(txHash string) (*MobulaStatusResponse, error) {
url := fmt.Sprintf("https://api.mobula.io/api/2/bridge/status/%s", txHash)
url := fmt.Sprintf("https://demo-api.mobula.io/api/2/bridge/status/%s", txHash)

req, err := http.NewRequest("GET", url, nil)
if err != nil {
Expand Down Expand Up @@ -164,7 +164,7 @@ func (m *MobulaBridge) GetStatus(txHash string) (*MobulaStatusResponse, error) {
}

func (m *MobulaBridge) VerifyRoutes() (*MobulaRoutesResponse, error) {
url := "https://api.mobula.io/api/2/bridge/routes"
url := "https://demo-api.mobula.io/api/2/bridge/routes"

req, err := http.NewRequest("GET", url, nil)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion harnesses/bridge-monitor/cmd/monitor/pricer.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TokenPriceUSD(symbol string, fallback float64) float64 {

func fetchPriceUSD(symbol string) float64 {
apiKey := os.Getenv("MOBULA_API_KEY")
url := fmt.Sprintf("https://api.mobula.io/api/1/market/data?symbol=%s", symbol)
url := fmt.Sprintf("https://demo-api.mobula.io/api/1/market/data?symbol=%s", symbol)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return 0
Expand Down
2 changes: 1 addition & 1 deletion harnesses/bridge-monitor/cmd/monitor/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (s *SlackNotifier) getBalanceSummary() string {

// fetchBalances calls Mobula API to get wallet balances
func (s *SlackNotifier) fetchBalances(wallet, blockchain string) string {
url := fmt.Sprintf("https://api.mobula.io/api/1/wallet/portfolio?wallet=%s&blockchains=%s", wallet, blockchain)
url := fmt.Sprintf("https://demo-api.mobula.io/api/1/wallet/portfolio?wallet=%s&blockchains=%s", wallet, blockchain)

req, err := http.NewRequest("GET", url, nil)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion harnesses/bridge-monitor/cmd/monitor/tx_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ func (tx *TxExecutor) PollMobulaStatus(txHash string, timeout time.Duration) (*B
}

func (tx *TxExecutor) getMobulaStatus(txHash string) (*BridgeStatus, error) {
url := fmt.Sprintf("https://api.mobula.io/api/2/bridge/status/%s", txHash)
url := fmt.Sprintf("https://demo-api.mobula.io/api/2/bridge/status/%s", txHash)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, err
Expand Down
Loading