Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • hive/clive
1 result
Show changes
Commits on Source (21)
Showing
with 194 additions and 83 deletions
......@@ -219,6 +219,13 @@ deploy_wheel_to_pypi:
- source docker_image_name.env
- docker push ${CLIVE_IMAGE_NAME}
- echo -e "${TXT_BLUE}Pushed image ${TXT_GREEN}${CLIVE_IMAGE_NAME}${TXT_CLEAR}"
- |
if [[ -n "$CI_COMMIT_TAG" ]]; then
GIT_IMAGE_TAG="${CLIVE_IMAGE_PATH}:${CLIVE_IMAGE_TAG_PREFIX}-${CI_COMMIT_TAG}"
echo -e "${TXT_BLUE}Tagging ${TXT_GREEN}${CLIVE_IMAGE_NAME} ${TXT_BLUE}with additional ${TXT_GREEN}${GIT_IMAGE_TAG}${TXT_CLEAR}"
docker tag "${CLIVE_IMAGE_NAME}" "${GIT_IMAGE_TAG}"
docker push "${GIT_IMAGE_TAG}"
fi
artifacts:
reports:
dotenv: docker_image_name.env
......
......@@ -61,9 +61,13 @@ repos:
- "--create"
- "--python-folders"
- "\
tests/clive-local-tools/clive_local_tools,\
tests/functional/,\
tests/tui/,\
tests/unit/,\
clive,
"
tests/clive-local-tools/clive_local_tools,\
tests/functional/,\
tests/tui/,\
tests/unit/,\
clive,
"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
external-sources=true
......@@ -33,6 +33,7 @@ def _wallet_dir_default() -> Path:
class BeekeeperConfig(CliveBaseModel):
wallet_dir: Path = Field(default_factory=_wallet_dir_default)
unlock_timeout: int = BeekeeperDefaults.DEFAULT_UNLOCK_TIMEOUT
unlock_interval: int = BeekeeperDefaults.DEFAULT_UNLOCK_INTERVAL
log_json_rpc: Path | None = BeekeeperDefaults.DEFAULT_LOG_JSON_RPC
webserver_http_endpoint: Url | None = Field(default_factory=webserver_default)
webserver_unix_endpoint: Url | None = None
......
......@@ -17,6 +17,7 @@ class BeekeeperDefaults(BaseModel):
DEFAULT_LOG_JSON_RPC: ClassVar[Path | None] = None
DEFAULT_NOTIFICATIONS_ENDPOINT: ClassVar[Url | None] = None
DEFAULT_UNLOCK_TIMEOUT: ClassVar[int] = 900
DEFAULT_UNLOCK_INTERVAL: ClassVar[int] = 500
DEFAULT_WALLET_DIR: ClassVar[Path] = Path.cwd()
DEFAULT_WEBSERVER_THREAD_POOL_SIZE: ClassVar[int] = 32
DEFAULT_WEBSERVER_HTTP_ENDPOINT: ClassVar[Url | None] = None
......@@ -193,7 +193,6 @@ class WitnessesDataRetrieval(CommandDataRetrieval[HarvestedDataRaw, SanitizedDat
witness_data = self.__create_witness_data(witness, data)
witnesses[witness.owner] = witness_data
assert len(witnesses) == self.search_by_pattern_limit
return witnesses
def __create_witness_data(self, witness: Witness, data: SanitizedData, *, rank: int | None = None) -> WitnessData:
......
......@@ -14,13 +14,8 @@ from clive.__private.ui.operations.operation_base_screen import OperationBaseScr
from clive.__private.ui.widgets.clive_tabbed_content import CliveTabbedContent
if TYPE_CHECKING:
from typing import Final
from textual.app import ComposeResult
WITNESSES_TAB_LABEL: Final[str] = "Witnesses"
PROPOSALS_TAB_NAME: Final[str] = "Proposals"
class Governance(OperationBaseScreen):
CSS_PATH = [
......@@ -31,18 +26,19 @@ class Governance(OperationBaseScreen):
def create_left_panel(self) -> ComposeResult:
with WitnessesDataProvider(paused=True), ProposalsDataProvider(paused=True), CliveTabbedContent():
yield Proxy("Proxy")
yield Witnesses(WITNESSES_TAB_LABEL)
yield Proposals(PROPOSALS_TAB_NAME)
yield Witnesses("Witnesses")
yield Proposals("Proposals")
@on(CliveTabbedContent.TabActivated)
def change_provider_status(self, event: CliveTabbedContent.TabActivated) -> None:
witnesses_provider = self.query_one(WitnessesDataProvider)
proposals_provider = self.query_one(ProposalsDataProvider)
if str(event.tab.label) == PROPOSALS_TAB_NAME:
active_pane = event.tabbed_content.active_pane
if isinstance(active_pane, Proposals):
witnesses_provider.pause()
proposals_provider.restart()
elif str(event.tab.label) == WITNESSES_TAB_LABEL:
elif isinstance(active_pane, Witnesses):
proposals_provider.pause()
witnesses_provider.restart()
else:
......
......@@ -192,7 +192,6 @@ class TransactionSummaryCommon(BaseScreen):
)
).result_or_raise
except CommandRequiresActiveModeError:
self.notify("Active mode is required for this action.", severity="warning")
raise # reraise so try_again_after_activation decorator can handle it
except Exception as error: # noqa: BLE001
self.notify(f"Transaction save failed. Reason: {error}", severity="error")
......@@ -224,7 +223,6 @@ class TransactionSummaryCommon(BaseScreen):
)
).raise_if_error_occurred()
except CommandRequiresActiveModeError:
self.notify("Active mode is required for this action.", severity="warning")
raise # reraise so try_again_after_activation decorator can handle it
except Exception as error: # noqa: BLE001
self.notify(f"Transaction broadcast failed! Reason: {error}", severity="error")
......
......@@ -61,11 +61,12 @@ class CliveScreen(Screen[ScreenResultType], CliveWidget):
async def _on_activation_result(value: bool) -> None:
if not value:
app_.notify("Aborted. Active mode is required for this action.", severity="warning")
app_.notify("Aborted. Active mode was required for this action.", severity="warning")
return
await func(*args, **kwargs)
app_.notify("This action requires active mode. Please activate...")
await app_.push_screen(Activate(activation_result_callback=_on_activation_result))
return wrapper
......
......@@ -41,6 +41,13 @@ FROM common AS instance
ARG CLIVE_VERSION
ARG BUILD_TIME
ARG GIT_COMMIT_SHA
ARG GIT_CURRENT_BRANCH
ARG GIT_LAST_LOG_MESSAGE
ARG GIT_LAST_COMMITTER
ARG GIT_LAST_COMMIT_DATE
# Project IDS:
# - 362 -> schemas
# - 392 -> clive
......@@ -52,6 +59,21 @@ RUN pip install clive=="${CLIVE_VERSION}" \
ENV TESTNET_MODE=0
LABEL org.opencontainers.image.created="$BUILD_TIME"
LABEL org.opencontainers.image.url="https://hive.io/"
LABEL org.opencontainers.image.documentation="https://gitlab.syncad.com/hive/clive"
LABEL org.opencontainers.image.source="https://gitlab.syncad.com/hive/clive"
LABEL org.opencontainers.image.version="${CLIVE_VERSION}"
LABEL org.opencontainers.image.revision="$GIT_COMMIT_SHA"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.ref.name="Clive"
LABEL org.opencontainers.image.title="Clive Image"
LABEL org.opencontainers.image.description="Runs Clive application"
LABEL io.hive.image.branch="$GIT_CURRENT_BRANCH"
LABEL io.hive.image.commit.log_message="$GIT_LAST_LOG_MESSAGE"
LABEL io.hive.image.commit.author="$GIT_LAST_COMMITTER"
LABEL io.hive.image.commit.date="$GIT_LAST_COMMIT_DATE"
ENTRYPOINT ["/entrypoint.sh"]
......@@ -96,4 +118,8 @@ RUN poetry install --only embeddedtestnet --no-root
ENV TESTNET_MODE=1
LABEL org.opencontainers.image.ref.name="Clive+Testnet"
LABEL org.opencontainers.image.title="Clive with Testnet Image"
LABEL org.opencontainers.image.description="Runs Clive with embedded Hive Testnet"
ENTRYPOINT ["/entrypoint.sh"]
Subproject commit fe0084ea6d075c2de1cd3b936747495398d1922b
Subproject commit a0d63be949167f44e297c53e3b7bb8a06a20726c
......@@ -468,12 +468,12 @@ hyperframe = ">=6.0,<7"
[[package]]
name = "helpy"
version = "0.0.1.dev125+419067e"
version = "0.0.1.dev128+7c551ee"
description = "Easily interact with the Hive blockchain using Python."
optional = false
python-versions = ">=3.10,<4.0"
files = [
{file = "helpy-0.0.1.dev125+419067e-py3-none-any.whl", hash = "sha256:232b2acbb5e6729873b4a813f7f87bf7269c7ba7eae10174e9ee2ca72f546d81"},
{file = "helpy-0.0.1.dev128+7c551ee-py3-none-any.whl", hash = "sha256:ebba5ded6f919c8888bb8825e2980132218ea6ea3ac25f3ea1a29357f4ac8f46"},
]
[package.dependencies]
......@@ -483,7 +483,7 @@ loguru = "0.7.2"
pytest-is-running = "1.5.0"
python-dateutil = "2.8.2"
requests = "2.27.1"
schemas = "0.0.1.dev283+db2351d"
schemas = "0.0.1.dev288+c98e6b2"
wax = "0.0.3a2.dev39+44db07f"
[package.source]
......@@ -1321,12 +1321,12 @@ files = [
[[package]]
name = "schemas"
version = "0.0.1.dev283+db2351d"
version = "0.0.1.dev288+c98e6b2"
description = "Tools for checking if message fits expected format"
optional = false
python-versions = ">=3.10,<4.0"
files = [
{file = "schemas-0.0.1.dev283+db2351d-py3-none-any.whl", hash = "sha256:371ecc39834be2c8c728d563a798e683b39be17cd5113cb5fc72e728d3dfc1dd"},
{file = "schemas-0.0.1.dev288+c98e6b2-py3-none-any.whl", hash = "sha256:557aa635263a54d61bdf9597f4a09a36086e53917fb3111ae928f1611f7a033e"},
]
[package.dependencies]
......@@ -1397,7 +1397,7 @@ develop = false
[package.dependencies]
abstractcp = "0.9.9"
helpy = "0.0.1.dev125+419067e"
helpy = "0.0.1.dev128+7c551ee"
loguru = "0.7.2"
python-dateutil = "2.8.2"
requests = "2.27.1"
......@@ -1408,13 +1408,13 @@ url = "hive/tests/python/hive-local-tools/test-tools"
[[package]]
name = "textual"
version = "0.47.1"
version = "0.52.1"
description = "Modern Text User Interface framework"
optional = false
python-versions = ">=3.8,<4.0"
files = [
{file = "textual-0.47.1-py3-none-any.whl", hash = "sha256:da79df2e138f6de51bda84a1ee1460936bb2ecf5527ca2d47b9b59c584323327"},
{file = "textual-0.47.1.tar.gz", hash = "sha256:4b82e317884bb1092f693f474c319ceb068b5a0b128b121f1aa53a2d48b4b80c"},
{file = "textual-0.52.1-py3-none-any.whl", hash = "sha256:960a19df2319482918b4a58736d9552cdc1ab65d170ba0bc15273ce0e1922b7a"},
{file = "textual-0.52.1.tar.gz", hash = "sha256:4232e5c2b423ed7c63baaeb6030355e14e1de1b9df096c9655b68a1e60e4de5f"},
]
[package.dependencies]
......@@ -1688,4 +1688,4 @@ multidict = ">=4.0"
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "dc10376eae8c7b7c04b088bdeb5134c4303cb10f3d85495cc755afd78fec409e"
content-hash = "842472e872d9e1d76237d75e41ad32ec84674befe3023c47fd4810b516a8e739"
......@@ -33,7 +33,7 @@ source = [
python = "^3.10"
dynaconf = "3.1.11"
loguru = "0.7.2"
textual = "0.47.1"
textual = "0.52.1"
aiohttp = "3.9.1"
pydantic = "1.10.11"
typer = { extras = ["all"], version = "0.9.0" }
......@@ -41,7 +41,7 @@ inflection = "0.5.1"
humanize = "4.6.0"
wax = "0.0.3a2.dev39+44db07f"
schemas = "0.0.1.dev283+db2351d"
schemas = "0.0.1.dev288+c98e6b2"
[tool.poetry.group.embeddedtestnet.dependencies]
......
......@@ -12,7 +12,7 @@ REGISTRY_URL="registry.gitlab.syncad.com/hive/clive"
# EDIT THESE VARIABLES
# IMAGE could be get from prepare_hived_image job like: https://gitlab.syncad.com/hive/clive/-/jobs/787089#L342
IMAGE="registry.gitlab.syncad.com/hive/hive/testnet-base_instance:testnet-base_instance-8233eeb01b15b2ea557e7a6d5c81f9e81b996b75"
IMAGE="registry.gitlab.syncad.com/hive/hive/testnet-base_instance:fe0084e"
CLIVE_VERSION="1.27.5.2"
BUILD_TESTNET=1
......@@ -23,12 +23,12 @@ BUILD_INSTANCE_PATH=$(realpath "${SCRIPTSDIR}/ci-helpers/")
cd "${BUILD_INSTANCE_PATH}"
BUILD_ARGS=(
${IMAGE_TAG}
${SRC_DIR}
${REGISTRY_URL}
--hived-source-image=${HIVED_SOURCE_IMAGE}
--base-image=${BASE_IMAGE}
--clive-version=${CLIVE_VERSION}
"${IMAGE_TAG}"
"${SRC_DIR}"
"${REGISTRY_URL}"
"--hived-source-image=${HIVED_SOURCE_IMAGE}"
"--base-image=${BASE_IMAGE}"
"--clive-version=${CLIVE_VERSION}"
)
if [ ${BUILD_TESTNET} -eq 1 ]; then
......
......@@ -12,4 +12,4 @@ if [[ $amount_of_occurences -ne 0 ]]; then
echo "Error! Found $amount_of_occurences occurrences of private key or password"
find_password_private_keys 2>&1
fi;
exit $amount_of_occurences
exit "$amount_of_occurences"
......@@ -4,7 +4,8 @@ set -euo pipefail
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
SCRIPTSDIR="$SCRIPTPATH/.."
LOG_FILE=build_instance.log
export LOG_FILE=build_instance.log
# shellcheck source=scripts/common.sh
source "$SCRIPTSDIR/common.sh"
BUILD_IMAGE_TAG=""
......@@ -35,8 +36,6 @@ print_help () {
echo
}
EXPORT_PATH=""
while [ $# -gt 0 ]; do
case "$1" in
--hived-source-image=*)
......@@ -80,13 +79,13 @@ while [ $# -gt 0 ]; do
shift
done
TST_IMGTAG=${BUILD_IMAGE_TAG:?"Missing arg #1 to specify built image tag"}
TST_SRCDIR=${SRCROOTDIR:?"Missing arg #2 to specify source directory"}
TST_REGISTRY=${REGISTRY:?"Missing arg #3 to specify target container registry"}
_TST_IMGTAG=${BUILD_IMAGE_TAG:?"Missing arg #1 to specify built image tag"}
_TST_SRCDIR=${SRCROOTDIR:?"Missing arg #2 to specify source directory"}
_TST_REGISTRY=${REGISTRY:?"Missing arg #3 to specify target container registry"}
TST_HIVED_IMAGE=${HIVED_IMAGE:?"Missing --hived-source-image to specify source for binaries of hived"}
TST_BASE_IMAGE=${BASE_IMAGE:?"Missing --base-image option to specify base image"}
TST_CLIVE_VERSION=${CLIVE_VERSION:?"Missing --clive-version option to specify clive version to be installed"}
_TST_HIVED_IMAGE=${HIVED_IMAGE:?"Missing --hived-source-image to specify source for binaries of hived"}
_TST_BASE_IMAGE=${BASE_IMAGE:?"Missing --base-image option to specify base image"}
_TST_CLIVE_VERSION=${CLIVE_VERSION:?"Missing --clive-version option to specify clive version to be installed"}
# Supplement a registry path by trailing slash (if needed)
[[ "${REGISTRY}" != */ ]] && REGISTRY="${REGISTRY}/"
......@@ -95,19 +94,53 @@ echo "Moving into source root directory: ${SRCROOTDIR}"
pushd "$SRCROOTDIR"
export DOCKER_BUILDKIT=1
CLIVE_IMAGE_TAG_PREFIX="${IMAGE_TAG_PREFIX}instance"
CLIVE_IMAGE_PATH="${REGISTRY}${CLIVE_IMAGE_TAG_PREFIX}${IMAGE_PATH_SUFFIX}"
CLIVE_IMAGE_NAME="${CLIVE_IMAGE_PATH}:${CLIVE_IMAGE_TAG_PREFIX}-${BUILD_IMAGE_TAG}"
docker build --target=${DOCKER_TARGET} \
--build-arg CI_REGISTRY_IMAGE=$REGISTRY \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--build-arg HIVED_IMAGE=${HIVED_IMAGE} \
--build-arg CLIVE_VERSION=${CLIVE_VERSION} \
-t ${CLIVE_IMAGE_NAME} \
-f docker/Dockerfile .
BUILD_TIME="$(date -uIseconds)"
GIT_COMMIT_SHA="$(git rev-parse HEAD || true)"
if [ -z "$GIT_COMMIT_SHA" ]; then
GIT_COMMIT_SHA="[unknown]"
fi
GIT_CURRENT_BRANCH="$(git branch --show-current || true)"
if [ -z "$GIT_CURRENT_BRANCH" ]; then
GIT_CURRENT_BRANCH="$(git describe --abbrev=0 --all | sed 's/^.*\///' || true)"
if [ -z "$GIT_CURRENT_BRANCH" ]; then
GIT_CURRENT_BRANCH="[unknown]"
fi
fi
GIT_LAST_LOG_MESSAGE="$(git log -1 --pretty=%B || true)"
if [ -z "$GIT_LAST_LOG_MESSAGE" ]; then
GIT_LAST_LOG_MESSAGE="[unknown]"
fi
GIT_LAST_COMMITTER="$(git log -1 --pretty="%an <%ae>" || true)"
if [ -z "$GIT_LAST_COMMITTER" ]; then
GIT_LAST_COMMITTER="[unknown]"
fi
GIT_LAST_COMMIT_DATE="$(git log -1 --pretty="%aI" || true)"
if [ -z "$GIT_LAST_COMMIT_DATE" ]; then
GIT_LAST_COMMIT_DATE="[unknown]"
fi
docker buildx build --target="${DOCKER_TARGET}" \
--build-arg CI_REGISTRY_IMAGE="$REGISTRY" \
--build-arg BASE_IMAGE="${BASE_IMAGE}" \
--build-arg HIVED_IMAGE="${HIVED_IMAGE}" \
--build-arg CLIVE_VERSION="${CLIVE_VERSION}" \
--build-arg BUILD_TIME="${BUILD_TIME}" \
--build-arg GIT_COMMIT_SHA="${GIT_COMMIT_SHA}" \
--build-arg GIT_CURRENT_BRANCH="${GIT_CURRENT_BRANCH}" \
--build-arg GIT_LAST_LOG_MESSAGE="${GIT_LAST_LOG_MESSAGE}" \
--build-arg GIT_LAST_COMMITTER="${GIT_LAST_COMMITTER}" \
--build-arg GIT_LAST_COMMIT_DATE="${GIT_LAST_COMMIT_DATE}" \
--tag "${CLIVE_IMAGE_NAME}" \
--file docker/Dockerfile .
popd
......
......@@ -45,8 +45,8 @@ do_clone() {
local commit="$4"
if [[ "$commit" != "" ]]; then
do_clone_commit $commit "$src_dir" $repo_url
do_clone_commit "$commit" "$src_dir" "$repo_url"
else
do_clone_branch "$branch" "$src_dir" $repo_url
do_clone_branch "$branch" "$src_dir" "$repo_url"
fi
}
#! /bin/bash
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit 1; pwd -P )"
echo "$SCRIPTPATH"
LOG_FILE=run_instance.log
export LOG_FILE=run_instance.log
# shellcheck source=scripts/common.sh
source "$SCRIPTPATH/common.sh"
log_exec_params "$@"
......@@ -53,8 +54,11 @@ while [ $# -gt 0 ]; do
;;
--docker-option=*)
option="${1#*=}"
add_docker_arg "$option"
options_string="${1#*=}"
IFS=" " read -ra options <<< "$options_string"
for option in "${options[@]}"; do
add_docker_arg "$option"
done
;;
--help)
print_help
......@@ -86,5 +90,14 @@ CMD_ARGS+=("${CLIVE_ARGS[@]}")
#echo "Using docker image: $IMAGE_NAME"
#echo "Additional hived args: ${CMD_ARGS[@]}"
# If command 'tput' exists
if command -v tput &> /dev/null
then
add_docker_arg "--env"
add_docker_arg "COLUMNS=$(tput cols)"
add_docker_arg "--env"
add_docker_arg "LINES=$(tput lines)"
fi
docker container rm -f -v "$CONTAINER_NAME" 2>/dev/null || true
docker run --rm -it -e HIVED_UID=$(id -u) -e COLUMNS=$(tput cols) -e LINES=$(tput lines) --name "$CONTAINER_NAME" --stop-timeout=180 ${DOCKER_ARGS[@]} "${IMAGE_NAME}" "${CMD_ARGS[@]}"
docker run --rm -it -e HIVED_UID="$(id -u)" --name "$CONTAINER_NAME" --stop-timeout=180 "${DOCKER_ARGS[@]}" "${IMAGE_NAME}" "${CMD_ARGS[@]}"
from __future__ import annotations
import asyncio
import re
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Final
import test_tools as tt
from textual.css.query import NoMatches
from textual.widgets._toast import Toast
if TYPE_CHECKING:
from textual.app import App
from textual.pilot import Pilot
from textual.widget import Widget
TRANSACTION_ID_RE_PAT = re.compile(r"Transaction with ID '(?P<transaction_id>[0-9a-z]+)'")
TRANSACTION_ID_RE_PAT: Final[re.Pattern[str]] = re.compile(r"Transaction with ID '(?P<transaction_id>[0-9a-z]+)'")
async def write_text(pilot: Pilot[int], text: str) -> None:
......@@ -28,14 +28,42 @@ def is_key_binding_active(app: App[int], key: str, description: str) -> bool:
async def get_notification_transaction_id(pilot: Pilot[int]) -> str:
"""
Will look for a toast notification containing the transaction ID and return it.
If no toast notification is found, will raise an AssertionError. If more than one toast notification is found, will
ignore the rest and return the transaction ID from the last one.
"""
seconds_to_wait: Final[float] = 3.0
async def look_for_transaction_id_in_toasts() -> str:
toasts = pilot.app.query(Toast)
contents = [str(toast.render()) for toast in toasts]
transaction_id = ""
for content in contents:
result = TRANSACTION_ID_RE_PAT.search(content)
if result is not None:
transaction_id = result.group("transaction_id")
return transaction_id
async def wait_for_transaction_id_to_be_found() -> str:
seconds_already_waited = 0.0
pool_time = 0.1
while True:
transaction_id = await look_for_transaction_id_in_toasts()
if transaction_id:
return transaction_id
tt.logger.info(
"Didn't find the transaction ID in the toast notification. Already waited"
f" {seconds_already_waited:.2f}s."
)
await asyncio.sleep(pool_time)
seconds_already_waited += pool_time
try:
toast: Widget = pilot.app.query_one("Toast")
except NoMatches as error:
raise AssertionError("Toast couldn't be found.") from error
tt.logger.debug(f"get_notification_transaction_id toast: {toast.render()}")
result = TRANSACTION_ID_RE_PAT.search(str(toast.render()))
assert result is not None, "Transaction ID couldn't be found in the toast."
transaction_id = result.group("transaction_id")
tt.logger.debug(f"transaction_id: '{transaction_id}'")
return transaction_id
return await asyncio.wait_for(wait_for_transaction_id_to_be_found(), timeout=seconds_to_wait)
except asyncio.TimeoutError:
raise AssertionError(
f"Toast notification containing the transaction ID couldn't be found. Waited {seconds_to_wait:.2f}s"
) from None
......@@ -22,10 +22,6 @@ Application Options:
--webserver-https-key-file-name arg
File name with a server's private key.
--notifications-endpoint arg
list of addresses, that will receive notification about in-chain
events
--export-keys-wallet arg
Export explicitly private keys to a local file `wallet_name.keys`.
Both [name, password] are required for every wallet. By default is
......@@ -33,6 +29,13 @@ Application Options:
"PW5JViFn5gd4rt6ohk7DQMgHzQN6Z9FuMRfKoE5Ysk25mkjy5AY1b"]"
--export-keys-wallet "["green-wallet",
"PW5KYF9Rt4ETnuP4uheHSCm9kLbCuunf6RqeKgQ8QRoxZmGeZUhhk"]"
--notifications-endpoint arg
list of addresses, that will receive notification about in-chain
events
--unlock-interval arg (=500)
Protection against unlocking by bots. Every wrong `unlock` enables a
delay. By default 500[ms].
--wallet-dir arg (=.)
The path of the wallet files (absolute path or relative to
application data dir)
......