Skip to content
Snippets Groups Projects
Commit ef4bd32b authored by Vincent Texier's avatar Vincent Texier
Browse files

Merge branch 'fix_v1_to_v2_conversion' into 'main'

Fix attribute name in v1 to v2 conversion

See merge request !5
parents 57be55cd c77baab0
Branches
Tags
1 merge request!5Fix attribute name in v1 to v2 conversion
Pipeline #41552 waiting for manual action
......@@ -63,8 +63,9 @@ def test_v1_import_wizard_with_identity(
None,
IdentityStatus.MEMBER,
)
application.identities.add(source_identity)
source_identity_name = "identity_name"
source_identity.name = source_identity_name
application.identities.add(source_identity)
assert source_account is not None
assert source_account.balance == 1000
......@@ -104,7 +105,10 @@ def test_v1_import_wizard_with_identity(
assert window.sourceAddressValueLabel.text() == source_account.address
assert window.sourceBalanceValueLabel.text() == "ĞD10.00"
assert window.sourceErrorLabel.text() == ""
assert window.sourceIdentityValueLabel.text() == f"#{source_identity_index}"
assert (
window.sourceIdentityValueLabel.text()
== f"{source_identity_name}#{source_identity_index}"
)
assert window.wizardPage2.isComplete() is True
......
......@@ -130,7 +130,7 @@ class V1AccountImportWizardWindow(QWizard, Ui_importAccountV1Wizard):
identity = self.application.identities.get_by_address(account.address)
if identity is not None and identity.name is not None:
account_label = f"{identity.name0}#{identity.index}"
account_label = f"{identity.name}#{identity.index}"
self.sourceV1AccountComboBox.addItem(
account_label,
userData=account.address,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment