Skip to content

Balance - no network request returns mainnet despite defaultNetwork change in Ethereum #596

@rapcmia

Description

@rapcmia

Describe the bug

While testing #583 by setting Ethereum's defaultNetwork to another e.g mainnet to arbirtum, then run balance command observed that when testing balances without network still return mainnet which should be arbitrum

#### /chains/ethereum/balances
curl --max-time 20 -sS http://localhost:15888/chains/ethereum/balances -u "XXX:XXX" -H 'Content-Type: application/json' -d '{"network":"arbitrum","address":"0x08940dc9B5a19FAb9319b77C61DDA7B8067E6843"}' | jq
{
  "balances": {
    "ETH": 0.004348634416537926,
    "USDT": 3.577757,
    "USDC": 0.583528
  }
}
logs: not found related error on logs

#### /chains/ethereum/balances w/ no network
curl --max-time 20 -sS http://localhost:15888/chains/ethereum/balances -u "XXX:XXX" -H 'Content-Type: application/json' -d '{"address":"0x08940dc9B5a19FAb9319b77C61DDA7B8067E6843"}' | jq
{
  "balances": {
    "ETH": 0.006855969459530184,
    "USDC": 5.506011
  }
}
logs: not found related error on logs
  • The balance returned with no network was with mainnet when it should be arbitrum since its the defaultNetwork?

Steps to reproduce

  1. Setup gateway
  2. Run /config/update endpoints to change defaultNetwork of ethereum namespace from mainnet to prefer e.g arbitrum, avalanche, polygon, etc
  3. Run /chains/ethereum/balances endpoints with or without network

Release version

v2.12, dev-2.13

Type of installation

Source

Attach required files

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions