Browse Source

swapserver: remove /api from url

master
ThomasV 2 years ago
parent
commit
88883d762c
  1. 8
      electrum/plugins/swapserver/server.py
  2. 2
      electrum/simple_config.py

8
electrum/plugins/swapserver/server.py

@ -34,10 +34,10 @@ class SwapServer(Logger, EventListener):
@log_exceptions
async def run(self):
app = web.Application()
app.add_routes([web.get('/api/getpairs', self.get_pairs)])
app.add_routes([web.post('/api/createswap', self.create_swap)])
app.add_routes([web.post('/api/createnormalswap', self.create_normal_swap)])
app.add_routes([web.post('/api/addswapinvoice', self.add_swap_invoice)])
app.add_routes([web.get('/getpairs', self.get_pairs)])
app.add_routes([web.post('/createswap', self.create_swap)])
app.add_routes([web.post('/createnormalswap', self.create_normal_swap)])
app.add_routes([web.post('/addswapinvoice', self.add_swap_invoice)])
runner = web.AppRunner(app)
await runner.setup()

2
electrum/simple_config.py

@ -852,7 +852,7 @@ class SimpleConfig(Logger):
elif constants.net == constants.BitcoinTestnet:
default = 'https://swaps.electrum.org/testnet'
else:
default = 'http://localhost:5455/api'
default = 'http://localhost:5455'
return self.SWAPSERVER_URL or default
# config variables ----->

Loading…
Cancel
Save