Skip to content

Commit

Permalink
remove not kyced
Browse files Browse the repository at this point in the history
  • Loading branch information
Jwyman328 committed Nov 17, 2024
1 parent ed56e8b commit 6d4c540
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 0 additions & 2 deletions backend/src/models/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
class LabelName(PyEnum):
DO_NOT_SPEND = "do not spend"
KYCED = "kyced"
NOT_KYCED = "not kyced"
# Add more labels as needed


label_descriptions = {
LabelName.DO_NOT_SPEND: "This output should not be spent. This can be helpful for outputs that may comprimise your privacy, like KYCED outputs, or toxic change from a coinjoin.",
LabelName.KYCED: "KYC, also known as Know Your Customer, is the process of verifying the identity of customers. This output has been KYCed, which means it is attached to your name, and therefore you should be careful when spending it as it may be being monitoring.",
LabelName.NOT_KYCED: "KYC, also known as Know Your Customer, is the process of verifying the identity of customers. This output has not been KYCed, and therefore is not attached to your name, increasing your privacy.",
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
from unittest import TestCase

from unittest.mock import MagicMock, Mock
from typing import List
from src.app import AppCreator
from src.models.label import Label
from src.my_types.controller_types.utxos_dtos import (
OutputLabelDto,
PopulateOutputLabelsRequestDto,
)
from src.my_types.transactions import LiveWalletOutput
from src.services.wallet.wallet import WalletService
from src.tests.mocks import all_transactions_mock, all_outputs_mock
import json
from bitcoinlib.transactions import Output


class TestTransactionsController(TestCase):
Expand All @@ -26,7 +22,8 @@ def setUp(self):
)

def test_get_transactions(self):
get_all_transactions_mock = MagicMock(return_value=all_transactions_mock)
get_all_transactions_mock = MagicMock(
return_value=all_transactions_mock)
with self.app.container.wallet_service.override(self.mock_wallet_service):
self.mock_wallet_service.get_all_transactions = get_all_transactions_mock
get_transactions_response = self.test_client.get("/transactions/")
Expand All @@ -43,7 +40,8 @@ def test_get_utxos(self):
get_all_outputs_mock = MagicMock(return_value=all_outputs)
with self.app.container.wallet_service.override(self.mock_wallet_service):
self.mock_wallet_service.get_all_outputs = get_all_outputs_mock
get_all_outputs_response = self.test_client.get("transactions/outputs")
get_all_outputs_response = self.test_client.get(
"transactions/outputs")

get_all_outputs_mock.assert_called_once()

Expand Down Expand Up @@ -161,7 +159,8 @@ def test_get_populate_labels(self):
)

mock_populate_labels = {"mock-txid-0": [output_label_mock_one]}
get_output_labels_unique_mock = MagicMock(return_value=mock_populate_labels)
get_output_labels_unique_mock = MagicMock(
return_value=mock_populate_labels)

with self.app.container.wallet_service.override(self.mock_wallet_service):
self.mock_wallet_service.get_output_labels_unique = (
Expand Down

0 comments on commit 6d4c540

Please sign in to comment.