Skip to content

Commit

Permalink
Update admin page for Master Copies
Browse files Browse the repository at this point in the history
- Allow `initial_block_number` to be set on the admin page
- Set `Safe` as the default deployer
  • Loading branch information
Uxio0 committed Oct 9, 2023
1 parent ec32be0 commit d3a69c2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 0 additions & 1 deletion safe_transaction_service/history/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ def tx_hash(self, o: ModuleTransaction):
class MonitoredAddressAdmin(BinarySearchAdmin):
actions = ["reindex", "reindex_last_day", "reindex_last_week", "reindex_last_month"]
list_display = ("address", "initial_block_number", "tx_block_number")
readonly_fields = ["initial_block_number"]
search_fields = ["=address"]

@admin.action(description="Reindex from initial block")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.5 on 2023-10-09 12:35

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("history", "0075_multisigtransaction_proposer"),
]

operations = [
migrations.AlterField(
model_name="safemastercopy",
name="deployer",
field=models.CharField(default="Safe", max_length=50),
),
]
2 changes: 1 addition & 1 deletion safe_transaction_service/history/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@ def relevant(self):
class SafeMasterCopy(MonitoredAddress):
objects = SafeMasterCopyManager.from_queryset(SafeMasterCopyQueryset)()
version = models.CharField(max_length=20, validators=[validate_version])
deployer = models.CharField(max_length=50, default="Gnosis")
deployer = models.CharField(max_length=50, default="Safe")
l2 = models.BooleanField(default=False)

class Meta:
Expand Down

0 comments on commit d3a69c2

Please sign in to comment.