gateway
gateway copied to clipboard
PancakeSwap Router not support token address not in token list
Describe the bug
When attempting to execute a swap through the PancakeSwap router connector using token addresses (not symbols), the swap fails with a NotFoundError. According to the documentation, Gateway 2.9.0 should accept token addresses directly without requiring them to be added to the token list first.
Steps to reproduce
Steps to Reproduce
- Start Gateway v2.9.0 with BSC network configured
- Run the following command in Hummingbot:
gateway swap pancakeswap/router
- Enter the following parameters:
- Base token:
0x02e75d28A8AA2a0033b8cf866fCf0bB0E1eE4444(full address) - Quote token:
WBNB(or address) - Amount:
0.001 - Side:
BUY
- Base token:
Expected Behavior
The swap should execute successfully, as the documentation states:
"The new Gateway endpoints accept addresses for baseToken and quoteToken in addition to symbols, so you should be able to use addresses directly before adding their symbols into the network's token list."
Actual Behavior
The command fails with error:
Error executing swap: Error on GET http://localhost:15888/connectors/pancakeswap/router/quote-swap
Error: NotFoundError
Release version
2.9.0
Type of installation
Source
Attach required files
Fixed in https://github.com/hummingbot/gateway/pull/543