From 02656f9f614374b3f30b0cc57562e31c570cdf3d Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Mon, 14 Aug 2017 12:21:40 +0300 Subject: console: use keypad based pinpad (Trezor request) --- console/bridge.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'console/bridge.go') diff --git a/console/bridge.go b/console/bridge.go index b2d4e0974..b28cc438e 100644 --- a/console/bridge.go +++ b/console/bridge.go @@ -110,20 +110,15 @@ func (b *bridge) OpenWallet(call otto.FunctionCall) (response otto.Value) { } // Trezor PIN matrix input requested, display the matrix to the user and fetch the data fmt.Fprintf(b.printer, "Look at the device for number positions\n\n") - fmt.Fprintf(b.printer, "a | b | c\n") + fmt.Fprintf(b.printer, "7 | 8 | 9\n") fmt.Fprintf(b.printer, "--+---+--\n") - fmt.Fprintf(b.printer, "d | e | f\n") + fmt.Fprintf(b.printer, "4 | 5 | 6\n") fmt.Fprintf(b.printer, "--+---+--\n") - fmt.Fprintf(b.printer, "g | h | i\n\n") + fmt.Fprintf(b.printer, "1 | 2 | 3\n\n") if input, err := b.prompter.PromptPassword("Please enter current PIN: "); err != nil { throwJSException(err.Error()) } else { - // Transform the alphabetical input to numbers - mapping := map[string]string{"a": "7", "b": "8", "c": "9", "d": "4", "e": "5", "f": "6", "g": "1", "h": "2", "i": "3"} - for from, to := range mapping { - input = strings.Replace(input, from, to, -1) - } passwd, _ = otto.ToValue(input) } if val, err = call.Otto.Call("jeth.openWallet", nil, wallet, passwd); err != nil { -- cgit