tdex-network / tdex-daemon

Go implementation of the TDEX Beta Daemon
https://tdex.network
MIT License
11 stars 13 forks source link

The pairs with the mobile application do not appear #744

Open jomagalo opened 8 months ago

jomagalo commented 8 months ago

Update

In my tests installing the version offered by Google Play, the pairs do not appear. Yes it works with the latest version on github.

Recreating the issue

I add the URL testnet.nefis.es from the mobile application but the pairs do not appear. I'm using NGINX as proxy with HTTPS connection at 127.0.0.1:9945

docker ps -a
CONTAINER ID   IMAGE                                  COMMAND    CREATED        STATUS          PORTS                                                                                  NAMES
217f8f26f894   compose_tdexd                          "tdexd"    25 hours ago   Up 35 minutes   0.0.0.0:9000->9000/tcp, :::9000->9000/tcp, 0.0.0.0:9945->9945/tcp, :::9945->9945/tcp   tdexd
7eebe02ad260   ghcr.io/vulpemventures/oceand:latest   "oceand"   25 hours ago   Up 35 minutes   0.0.0.0:18000->18000/tcp, :::18000->18000/tcp, 18001/tcp                               oceand

config nginx:

upstream tdex {

                server 127.0.0.1:9945;
        }

server {

                listen 443 ssl;
                ssl_certificate /etc/ssl/certs/nefis.crt;
                ssl_certificate_key /etc/ssl/private/nefis.key;

                #ssl_handshake_timeout    10s;
                ssl_session_cache shared:SSL:1m;
                ssl_session_timeout 4h;
                ssl_protocols TLSv1.2 TLSv1.3;
                #ssl_prefer_server_ciphers on;
                ssl_ciphers HIGH:!aNULL:!MD5;
                proxy_pass tdex;
       }

tdex config

tdex config
quote_asset: f3d1ec678811398cd2ae277cbe3849c6f6dbd72c74bc542f7c4b11ff0e820958
macaroons_path: /home/tdex/.tdex-daemon/macaroons/admin.macaroon
no_tls: true
no_macaroons: false
proto: http
rpcserver: localhost:9000
tls_cert_path:
base_asset: 144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49
network: testnet

tdex status

tdex status
{
        "initialized": true,
        "unlocked": true,
        "synced": true
}

Market info

tdex market info
{
        "info": {
                "market": {
                        "base_asset": "144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49",
                        "quote_asset": "f3d1ec678811398cd2ae277cbe3849c6f6dbd72c74bc542f7c4b11ff0e820958"
                },
                "fee": {
                        "percentage_fee": {
                                "base_asset": "200",
                                "quote_asset": "100"
                        },
                        "fixed_fee": {
                                "base_asset": "700",
                                "quote_asset": "1000000"
                        }
                },
                "tradable": true,
                "strategy_type": "STRATEGY_TYPE_PLUGGABLE",
                "name": "lbtc_usdt",
                "price": {
                        "base_price": 0.00001936,
                        "quote_price": 51640
                },
                "balance": {
                        "144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49": {
                                "confirmed_balance": "30000000",
                                "unconfirmed_balance": "0",
                                "locked_balance": "0",
                                "total_balance": "30000000"
                        },
                        "58af36e1b529b42f3e4ccce812924380058cae18b2ad26c89805813a9db25980": {
                                "confirmed_balance": "100000000000",
                                "unconfirmed_balance": "0",
                                "locked_balance": "0",
                                "total_balance": "100000000000"
                        },
                        "b612eb46313a2cd6ebabd8b7a8eed5696e29898b87a43bff41c94f51acef9d73": {
                                "confirmed_balance": "200000000000",
                                "unconfirmed_balance": "0",
                                "locked_balance": "0",
                                "total_balance": "200000000000"
                        },
                        "f3d1ec678811398cd2ae277cbe3849c6f6dbd72c74bc542f7c4b11ff0e820958": {
                                "confirmed_balance": "10000000000",
                                "unconfirmed_balance": "0",
                                "locked_balance": "0",
                                "total_balance": "10000000000"
                        }
                },
                "base_asset_precision": 8,
                "quote_asset_precision": 8
        }
}

Browser result

https://testnet.nefis.es {"code":5,"message":"Not Found","details":[]} https://testnet.nefis.es/v2/transport {"acceptedTypes":["CONTENT_TYPE_JSON","CONTENT_TYPE_GRPC","CONTENT_TYPE_GRPCWEB","CONTENT_TYPE_GRPCWEBTEXT"]}

tiero commented 8 months ago

from the mobile application but the pairs do not appear.

Did you tried to kill and re-open the app after adding the provider from settings?

jomagalo commented 8 months ago

Yes I have done it several times. What is not clear to me is which port to use as the nginx proxy for the 9000 or 9945 mobile application. I have tried it on both ports to no avail. According to the manual, the port for the trader is 9945.

Another thing I notice is that the tdex version does not appear.

tdex -v
tdex operator CLI version
Version:
Commit:
Date:

I also don't see a way to open a certain market. If I create several markets and use tdex market open it only opens the first market created, but I see a way to call a market by name to be able to open it.

tiero commented 8 months ago

I also don't see a way to open a certain market. If I create several markets and use tdex market open it only opens the first market created, but I see a way to call a market by name to be able to open it.

we are investigating this!

Another thing I notice is that the tdex version does not appear.

Did you build the CLI yourself or using one from github releases? In the former case, I think is because at build time we require that infos (version, commit, date) so it may be to that reason

altafan commented 8 months ago

I'm able to list your markets with cURL!

Screenshot 2024-02-26 at 16 12 29

I also don't see a way to open a certain market. If I create several markets and use tdex market open it only opens the first market created, but I see a way to call a market by name to be able to open it.

Is it possible that you sent the funds to the wrong market? Based on the market info you provided, the LBTC/USDT market holds the following non-required funds:

tiero commented 8 months ago

I see your market from my TDEX App.

I did:

  1. Settings > Manage Liquidity Providers
  2. Added your as nefis.es with URL https://testnet.nefis.es
  3. Removed all the others to remove competing ones
  4. went to the swap page, reload with pull to refresh
  5. I see you as source of liquidity in the swap LBTC > USDT
image
tiero commented 8 months ago

Are you trying to reach your provider passing the port :9945? consider that since you are using a ngnix reverse proxy, you are routing the 80/443 the Trader interface on 9945 internally.

TDEX daemon has trader and operator servers on two different ports. You can make to listen on a single port for both server: Trader, which is used by traders, and Operator which is used by the owner of the daemon wallet to administer via gRPC or via TDEX Dashboard)

You can make trader and operator on the same port, so you can use the tdex daemon remotely, TLS-terminated by your ngnix proxy and secured by macaroons.

Just pass the following to have to listen on same port

TDEX_OPERATOR_PORT=9945
TDEX_TRADE_PORT=9945
jomagalo commented 8 months ago

Well, I've tried it on two different phones and it doesn't work. Tested with and without wifi.

Aplication version: TDEX 1.3.1: 17

Screenshot_20240226-163133_TDEX Screenshot_20240226-164046_TDEX

jomagalo commented 8 months ago

With TDEX version 2.0.0: 18 if the pairs appear. With what Google Play offers, no

tiero commented 8 months ago

Ouch apparently google banned the app?