Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reinstate Liquid #1

Open
wants to merge 2 commits into
base: v4
Choose a base branch
from
Open

Conversation

HashMapsData2Value
Copy link
Collaborator

@HashMapsData2Value HashMapsData2Value commented Jan 23, 2025

Since we failed to upgrade liquid-auth-use-wallet-client from AlgoSDK v2.9.0 to v3 in time, Doug had the Liquid wallet temporarily removed from inclusion into Use-Wallet v4.

This is the revert PR: TxnLab#337
This PR reverts the revert, while adjusting to changes to happened in the meantime (removal of networks).

Due to issues I encountered with pnpm on my computer, I switched to using my own fork of liquid-auth-use-wallet. On it I merged Algosdk v3.1 and pushed version 1.1.0 to NPM, and then used that as an import.

Turns out, the only thing I really had to do was update the test. The src code itself was already AlgoSDK v3 proof. A small worry I had had (and admittedly the reason for not just taking a quick look at this earlier) was that there would be an issue with the Android client demo app itself, but I found through testing with this branch that it worked as normal. I leave it to the reviewer to double check that however.

To test:

  1. build the packages/use-wallet folder
  2. build examples/vanilla-ts
  3. cd into the liquid auth backend example and do docker-compose up -d
  4. access ngrok page and test with Liquid Auth Android

Copy link
Member

@PhearZero PhearZero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let get this back to our repository for a full review, we can produce a canary when algorandfoundation/liquid-auth-use-wallet-client/pull/10 lands then just consume it directly.

Without the artifact we will not be able to test properly, it should produce canary builds which we can use to test. Then the switch will be shallower to review

@HashMapsData2Value HashMapsData2Value marked this pull request as ready for review January 29, 2025 16:56
chore: prettier

chore: fix test

chore: prettier

fix: replace with official @algorandfoundation

chore: remove unused ts expect error

chore: prettier fix
@PhearZero PhearZero self-requested a review January 30, 2025 13:57
Copy link
Member

@PhearZero PhearZero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to refactor the docker compose and default ports it looks like.

services:
  liquid-auth:
    image: ghcr.io/algorandfoundation/liquid-auth:develop
    restart: no
    env_file:
      - .env.docker
    ports:
      - '3000:3000'
    depends_on:
      - redis
      - mongo

  ngrok:
    image: ngrok/ngrok:latest
    restart: no
    command:
      - 'start'
      - '--all'
      - '--config'
      - '/etc/ngrok.yml'
    volumes:
      - ./ngrok.yml:/etc/ngrok.yml
    ports:
      - 4040:4040
    depends_on:
      - liquid-auth

  redis:
    image: redis
    restart: always
    ports:
      - '6379:6379'

  mongo:
    image: mongo:7.0
    restart: no
    environment:
      - MONGO_INITDB_DATABASE=${DB_NAME:-fido}
      - MONGO_INITDB_ROOT_USERNAME=${DB_USERNAME:-algorand}
      - MONGO_INITDB_ROOT_PASSWORD=${DB_PASSWORD:-algorand}
    ports:
      - '27017:27017'
    volumes:
      - mongo:/data/db
volumes:
  mongo:

We also want to update the .env.docker.example and .ngrok.yaml examples to reflect a standard port like 3000

@HashMapsData2Value
Copy link
Collaborator Author

We will need to refactor the docker compose and default ports it looks like.

services:
  liquid-auth:
    image: ghcr.io/algorandfoundation/liquid-auth:develop
    restart: no
    env_file:
      - .env.docker
    ports:
      - '3000:3000'
    depends_on:
      - redis
      - mongo

  ngrok:
    image: ngrok/ngrok:latest
    restart: no
    command:
      - 'start'
      - '--all'
      - '--config'
      - '/etc/ngrok.yml'
    volumes:
      - ./ngrok.yml:/etc/ngrok.yml
    ports:
      - 4040:4040
    depends_on:
      - liquid-auth

  redis:
    image: redis
    restart: always
    ports:
      - '6379:6379'

  mongo:
    image: mongo:7.0
    restart: no
    environment:
      - MONGO_INITDB_DATABASE=${DB_NAME:-fido}
      - MONGO_INITDB_ROOT_USERNAME=${DB_USERNAME:-algorand}
      - MONGO_INITDB_ROOT_PASSWORD=${DB_PASSWORD:-algorand}
    ports:
      - '27017:27017'
    volumes:
      - mongo:/data/db
volumes:
  mongo:

We also want to update the .env.docker.example and .ngrok.yaml examples to reflect a standard port like 3000

Why would we need to make changes to the docker-compose? Did Liquid Auth change in the meanwhile?

@PhearZero
Copy link
Member

Why would we need to make changes to the docker-compose? Did Liquid Auth change in the meanwhile?

Nothing has changed but we could improve the DX. We should be able to use the development server in vite as the endpoint. That would also remove the requirement of ngrok/https since everything will be localhost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants