Git Product home page Git Product logo

trezor-connect-electron-boilerplate's People

Contributors

szymonlesisz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

trezor-connect-electron-boilerplate's Issues

Cannot send PIN with TrezorConnect.uiResponse() without popup

In TrezorConnect.init() I set popup: false. I connect device, start app, click on Get public key button, the popup shows up (but doesn't require interaction) with loading circle spinning and the logs show a UI_EVENT with type UI.REQUEST_PIN.

I handle the UI.REQUEST_PIN event directly with TrezorConnect.uiResponse({ type: UI.RECEIVE_PIN, payload: 'XXXXXX' }) but I get:

{
      "event": "UI_EVENT",
      "type": "ui-invalid_pin",
      "payload": {
        "device": {
          "type": "acquired",
          "path": "lib01",
          "label": "foo",
          "status": "available",
          "mode": "normal",
          "firmware": "valid",
          "features": {
                ......
          }
        }
      }
    }

This sequence is repeated 2 times while the popup is still open and loading is spinning and the 3rd UI_EVENT.REQUEST_PIN is followed by UI_EVENT.CLOSE_UI_WINDOW at which point the popup closes and I get in console:

POST http://127.0.0.1:21325/call/259 400 (Bad Request)

Console also shows after the UI_EVENT.RECEIVE_PIN:

Core handle message in core true 
{ event: "UI_EVENT", type: "ui-receive_pin", payload: "XXXXXXXX", id: 2}
[trezor-link] Calling BridgeTransport.call( 276 PinMatrixAck {pin: "XXXXXXXX"} false )
[trezor-link] Done BridgeTransport.call, result  
{ message: {
      code: "Failure_PinInvalid"
      message: "PIN invalid"
  },
  type: "failure"
}

If in TrezorConnect.init() I set popup: true and provide the pin manually in the popup, then all works fine. Including if I proceed to set afterwards again popup: false and reload electron app with Ctrl-R. I can get public keys without interacting with popup.

Any idea why the PIN doesn't get recognized with TrezorConnect.uiResponse()?

Note: I use trezor-connect hosted locally, the one included in the project.

Iframe timeout -> Popup blocked

I was trying to use the official trezor connect on one electron app and got a iframe timeout and a popup saying that the popup was blocked when trying to use any api method.
Tried to launch this github project to see if I got a different result but nop, I got the same.
Can you help me?
Error_trezor_connect

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.