AstarNetwork / astar-faucet-bot

Astar test network faucet bot
MIT License
9 stars 6 forks source link

fix: Connect to Shibuya network after user requests for SDN faucet #17

Closed impelcrypto closed 2 years ago

impelcrypto commented 2 years ago
impelcrypto commented 2 years ago

@hoonsubin Yes, so here the API instance connects to 'shibuya'. Does this look good to you?

hoonsubin commented 2 years ago

@impelcrypto https://github.com/AstarNetwork/astar-faucet-bot/blob/384dd657625a3d90dd4ecb365f867b32ca058164/src/modules/faucet/utils/index.ts#L62 is not used for Discord. What about changing this

https://github.com/AstarNetwork/astar-faucet-bot/blob/384dd657625a3d90dd4ecb365f867b32ca058164/src/clients/astar.ts#L116

and letting express and discord access the network from this instance.

Or you can add Shiden faucet functionality to Discord bot, which should be simpler. The problem is that the network that the Discord app is accessing depends on what the last call was on the UI.

impelcrypto commented 2 years ago

@hoonsubin I've changed sendTokenTo method, kindly take a look please.