diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 1a8d01d0..00000000 --- a/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM ubuntu:22.04 - -ARG USERNAME=developer -ARG USER_UID=1000 -ARG USER_GID=$USER_UID - -# Create the user -RUN groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ - # - # [Optional] Add sudo support. Omit if you don't need to install software after connecting. - && apt-get update \ - && apt-get install -y sudo \ - && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME - -# Install some dependencies as root -RUN apt-get update && apt-get install -y \ - wget \ - python3.10 python3-pip python3.10-venv \ - git \ - pkg-config \ - libssl-dev && \ - rm -rf /var/lib/apt/lists/* - -# Switch to regular user -USER $USERNAME -WORKDIR /home/${USERNAME} - -RUN sudo apt-get update -RUN sudo apt-get install git - -# RUN sudo apt install pipx -y 8 - -# RUN pipx ensurepath - -# RUN pipx install git+https://github.com/multiversx/mx-sdk-py-cli@fix-deps-all diff --git a/multiversx_sdk_cli/native_auth_client.py b/multiversx_sdk_cli/native_auth_client.py index 6cba3010..db9c8217 100644 --- a/multiversx_sdk_cli/native_auth_client.py +++ b/multiversx_sdk_cli/native_auth_client.py @@ -6,13 +6,17 @@ from multiversx_sdk_cli.errors import NativeAuthClientError +NUMBER_OF_SECONDS_IN_A_MINUTE = 60 +NUMBER_OF_MINUTES_IN_AN_HOUR = 60 +NUMBER_OF_HOURS_IN_A_DAY = 24 + class NativeAuthClientConfig: def __init__( self, origin: str = '', api_url: str = "https://api.multiversx.com", - expiry_seconds: int = 60 * 60 * 24, + expiry_seconds: int = NUMBER_OF_SECONDS_IN_A_MINUTE * NUMBER_OF_MINUTES_IN_AN_HOUR * NUMBER_OF_HOURS_IN_A_DAY, block_hash_shard: Optional[int] = None, gateway_url: Optional[str] = None, extra_request_headers: Optional[Dict[str, str]] = None