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

multi: Replace trezor.js with connect. #2705

Merged
merged 2 commits into from
Oct 20, 2020
Merged

Commits on Oct 19, 2020

  1. Configuration menu
    Copy the full SHA
    aba878c View commit details
    Browse the repository at this point in the history
  2. multi: Use connect.

    trezor.js is being deprecated. Switch to using trezor/connect to
    communicate with a trezor device.
    
    connect has no way of listing connected devices or choosing a device.
    So, remove the device list. Also do not create separate sessions. There
    is not only the one session or transport layer that we communicate
    over.
    
    Changes by file:
    
    TrezorActions.js
     - Use a singular session for communication. Adjust all methods
       appropriately.
     - Pull constants from trezor/connect.
     - Drop all references to a device list.
     - Store only the device ID and label.
     - Add a connect method.
     - Add initial init method settings.
     - Replace device listeners.
     - Add a listener for not backed up devices.
     - Adjust deviceRun to use a single session, error on no device, and
       also to catch errors in the returned payload.
     - Add getFeatures convenience method. No longer use stored features
       but request features from the device whenever they are needed.
     - Add noDevice convenience method.
     - Remove clearing device sessions. While this is a wanted feature, it
       is not yet clear how to achieve with connect. Leave a TODO to this
       affect.
     - Use boolean for canceled param in pin/password/word callbacks.
     - Move all attempt notifications to the beginning of methods, before
       the first possible failure.
     - Use named objects in session methods.
     - Add hex argument to signMessage and remove hex2b64 conversion.
     - Toggle methods and homescreen are now all part of applySettings.
       Other method names have also changed.
     - Add backup method.
     - Temporary stop firmware updates. This method will be implemented in a
       future commit. Updates can be done using the official site for now.
    
    Modals.js
     - Use local PassPhraseModal.
     - Replace reloadDeviceList with connect.
    
    ConfigButtons.js
     - Use red button for passphrase toggle.
     - Remove clear device session button. While this feature would be good
       to have, it is not yet clear how to clear the session and/or logout.
    
    RecoveryButtons.js
     - Use blue button for new backup option.
    
    TrezorPage/index.js
     - Replace reloadDeviceList with connect.
    
    connectors/trezor.js
     - Replace loadDeviceList and reloadDeviceList with connect.
     - Add backup device.
    
    constants/trezor.js
     - Add Model T homescreen.
     - Removed now unused trezor-link constants.
    
    helpers/trezor.js
     - If an output has an address_n it cannot have even a null address and
       vice-versa.
     - Amounts are now type checked to be strings.
     - script_sig must be in the bin outputs, and not in the outputs.
    
    externalRequests.js
     - Now only communicating with trezor connect.
    
    reducers/trezor.js
     - Remove device list constants.
     - Add connect, backup, and transport start/stop constants.
     - Do not store a device list. Store device ID and label.
    JoeGruffins committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    2c182c7 View commit details
    Browse the repository at this point in the history