diff --git a/core/models.py b/core/models.py index efc6ab70..e4d9d1e3 100644 --- a/core/models.py +++ b/core/models.py @@ -76,6 +76,7 @@ class Type(models.TextChoices): max_length=10, choices=Type.choices, default=Type.VERIFICATION ) description = models.TextField(null=True, blank=True) + negative_description = models.TextField(null=True, blank=True) explanation = models.TextField(null=True, blank=True) response = models.TextField(null=True, blank=True) icon_url = models.CharField(max_length=255, null=True, blank=True) @@ -190,6 +191,7 @@ def get_wallet_balance(self): ) if self.chain_type == NetworkTypes.EVM or int(self.chain_id) == 500: + # TODO: Get from Web3Utils return EVMFundManager(self).get_balance(self.wallet.address) elif self.chain_type == NetworkTypes.SOLANA: fund_manager = SolanaFundManager(self) @@ -226,6 +228,7 @@ def gas_price(self): try: from faucet.faucet_manager.fund_manager import EVMFundManager + # TODO: Get from Web3Utils return EVMFundManager(self).get_gas_price() except: # noqa: E722 logging.exception(f"Error getting gas price for {self.chain_name}") diff --git a/core/serializers.py b/core/serializers.py index 7fd7b2db..265d95b6 100644 --- a/core/serializers.py +++ b/core/serializers.py @@ -42,6 +42,7 @@ class Meta: "title", "type", "description", + "negative_description", "explanation", "response", "icon_url", @@ -53,6 +54,7 @@ class Meta: "title", "type", "description", + "negative_description", "explanation", "response", "icon_url", diff --git a/prizetap/migrations/0047_constraint_negative_description.py b/prizetap/migrations/0047_constraint_negative_description.py new file mode 100644 index 00000000..d46c2f8f --- /dev/null +++ b/prizetap/migrations/0047_constraint_negative_description.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.4 on 2024-01-03 08:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('prizetap', '0046_alter_raffle_creator_name_alter_raffle_description'), + ] + + operations = [ + migrations.AddField( + model_name='constraint', + name='negative_description', + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/tokenTap/migrations/0025_constraint_negative_description.py b/tokenTap/migrations/0025_constraint_negative_description.py new file mode 100644 index 00000000..2b316dca --- /dev/null +++ b/tokenTap/migrations/0025_constraint_negative_description.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.4 on 2024-01-03 08:04 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('tokenTap', '0024_tokendistribution_contract'), + ] + + operations = [ + migrations.AddField( + model_name='constraint', + name='negative_description', + field=models.TextField(blank=True, null=True), + ), + ]