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

[Additional Screenshot] PSBT Review: Before verifying multisig change addr #521

Merged
Merged
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
14 changes: 11 additions & 3 deletions tests/screenshot_generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def test_generate_screenshots(target_locale):
psbt_views.PSBTMathView,
(psbt_views.PSBTAddressDetailsView, dict(address_num=0)),

# TODO: Render Multisig change w/ and w/out the multisig wallet descriptor onboard
(psbt_views.PSBTChangeDetailsView, dict(change_address_num=0)),
(NotYetImplementedView, {}, "PSBTChangeDetailsView_multisig_unverified"), # Must manually re-run this below
(psbt_views.PSBTChangeDetailsView, dict(change_address_num=0), "PSBTChangeDetailsView_multisig_verified"),
(psbt_views.PSBTAddressVerificationFailedView, dict(is_change=True, is_multisig=False), "PSBTAddressVerificationFailedView_singlesig_change"),
(psbt_views.PSBTAddressVerificationFailedView, dict(is_change=False, is_multisig=False), "PSBTAddressVerificationFailedView_singlesig_selftransfer"),
(psbt_views.PSBTAddressVerificationFailedView, dict(is_change=True, is_multisig=True), "PSBTAddressVerificationFailedView_multisig_change"),
Expand Down Expand Up @@ -293,8 +293,16 @@ def screencap_view(view_cls: View, view_name: str, view_args: dict={}, toast_thr
readme += "</td></tr></table>"

# many screens don't work, leaving a missing image, re-run here for now
controller.psbt_seed = None
screenshot_renderer.set_screenshot_path(os.path.join(screenshot_root, "psbt_views"))

decoder = DecodeQR()
decoder.add_data(BASE64_PSBT_1)
controller.psbt = decoder.get_psbt()
controller.psbt_seed = seed_12b
controller.multisig_wallet_descriptor = None
screencap_view(psbt_views.PSBTChangeDetailsView, 'PSBTChangeDetailsView_multisig_unverified', dict(change_address_num=0))

controller.psbt_seed = None
screencap_view(psbt_views.PSBTSelectSeedView, 'PSBTSelectSeedView', {})

with open(os.path.join(screenshot_root, "README.md"), 'w') as readme_file:
Expand Down