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

Refactor command name #2227

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/web/celery/worker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ ${RUN_MIGRATIONS:-0} = 1 ]; then
python manage.py setup_service

echo "==> $(date +%H:%M:%S) ==> Setting contracts... "
python manage.py update_safe_contracts_logo
python manage.py setup_safe_contracts
fi

echo "==> $(date +%H:%M:%S) ==> Check RPC connected matches previously used RPC... "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from config.settings.base import STATICFILES_DIRS
from safe_transaction_service.contracts.models import Contract

TRUSTED_FOR_DELEGATE_CALL = ["MultiSendCallOnly"]
TRUSTED_FOR_DELEGATE_CALL = ["MultiSendCallOnly", "MultiSend"]


def generate_safe_contract_display_name(contract_name: str, version: str) -> str:
Expand All @@ -28,7 +28,7 @@ def generate_safe_contract_display_name(contract_name: str, version: str) -> str


class Command(BaseCommand):
help = "Update or create Safe contracts with provided logo"
help = "Create or update the Safe contracts with default data. A different logo can be provided"
Copy link
Member

Choose a reason for hiding this comment

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

It's doing more than updating the logo, please add the information


def add_arguments(self, parser):
parser.add_argument(
Expand All @@ -50,7 +50,7 @@ def add_arguments(self, parser):

def handle(self, *args, **options):
"""
Command to create or update Safe contracts with provided logo.
Command to create or update Safe contracts with default data. A different contract logo can be provided.
Copy link
Member

Choose a reason for hiding this comment

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

Same


:param args:
:param options: Safe version and logo path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_index_contracts_with_metadata(self):

@patch.object(EthereumClient, "get_chain_id", autospec=True, return_value=137)
def test_update_safe_contracts_logo(self, mock_chain_id: MagicMock):
command = "update_safe_contracts_logo"
command = "setup_safe_contracts"
buf = StringIO()
random_contract = ContractFactory()
previous_random_contract_logo = random_contract.logo.read()
Expand Down