Describe the bug
While testing #193 and use a Solana mint-address swap, the wallet successfully received 0.156298 TRUMP. Gateway's direct POST /chains/solana/balances route returned SOL, USDC, and TRUMP with the correct positive balances, but Hummingbot API's refreshed POST /portfolio/state response returned only SOL and USDC. Restarting Gateway did not change the result. The token remained registered, and Gateway continued to detect both SPL token accounts.
HAPI POST /portfolio/state ❌
curl -sS -u admin1:admin2 -H 'Content-Type: application/json' -X POST http://localhost:8000/portfolio/state -d '{
"account_names": ["master_account"],
"connector_names": ["solana-mainnet-beta"],
"skip_gateway": false,
"refresh": true
}' | jq
{
"master_account": {
"solana-mainnet-beta": [
{
"token": "SOL",
"units": 0.35160510300000003,
"price": 0.0,
"value": 0.0,
"available_units": 0.35160510300000003
},
{
"token": "USDC",
"units": 1.315996,
"price": 1.0,
"value": 1.315996,
"available_units": 1.315996
}
]
}
}
Gateway POST /chains/solana/balances ✅
{
"balances": {
"SOL": 0.35160510300000003,
"USDC": 1.315996,
"TRUMP": 0.156298
}
}
The expected result is for portfolio state to include every positive wallet balance returned by Gateway. The observed code path appears to store the complete Gateway wallet result and then overwrite the same master_account["solana-mainnet-beta"] entry with the narrower balance list from an initialized trading connector. This can make users or portfolio automation believe an asset is missing even though the wallet still holds it.
The affected code path is also present on the current main branch at ddcc11e87de1aea55446fb859f5babb1a940e937, but main was inspected rather than separately live-tested.
Steps to reproduce bug
- Start Hummingbot API and Gateway, then initialize solana-mainnet-beta with a pair such as SOL-USDC.
- Add a Solana token mint to Gateway and complete a swap so the default wallet holds a positive balance.
- Call Gateway’s POST /chains/solana/balances route and confirm the token is returned.
- Call Hummingbot API’s POST /portfolio/state with refresh: true, filtered to master_account and solana-mainnet-beta.
- Observe that portfolio state lists the connector’s tracked tokens but omits the additional Gateway wallet token.
Describe the bug
While testing #193 and use a Solana mint-address swap, the wallet successfully received 0.156298 TRUMP. Gateway's direct
POST /chains/solana/balancesroute returned SOL, USDC, and TRUMP with the correct positive balances, but Hummingbot API's refreshedPOST /portfolio/stateresponse returned only SOL and USDC. Restarting Gateway did not change the result. The token remained registered, and Gateway continued to detect both SPL token accounts.HAPI
POST /portfolio/state❌Gateway
POST /chains/solana/balances✅The expected result is for portfolio state to include every positive wallet balance returned by Gateway. The observed code path appears to store the complete Gateway wallet result and then overwrite the same master_account["solana-mainnet-beta"] entry with the narrower balance list from an initialized trading connector. This can make users or portfolio automation believe an asset is missing even though the wallet still holds it.
The affected code path is also present on the current main branch at
ddcc11e87de1aea55446fb859f5babb1a940e937, but main was inspected rather than separately live-tested.Steps to reproduce bug