Skip to content

Commit dd6996e

Browse files
committed
Merge branch 'bitbox01'
2 parents 08e4b14 + ac301bc commit dd6996e

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

backend/devices/bitbox/communication.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"encoding/json"
2222
"io"
2323
"runtime"
24-
"strconv"
2524
"unicode"
2625

2726
"github.com/btcsuite/btcd/chaincfg/chainhash"
@@ -63,16 +62,7 @@ func maybeDBBErr(jsonResult map[string]interface{}) error {
6362
}
6463
errCode, ok := errMap["code"].(float64)
6564
if !ok {
66-
// since v7.0.2, errors are returned as strings.
67-
errCodeStr, ok := errMap["code"].(string)
68-
if !ok {
69-
return errp.WithContext(errp.New("Unexpected reply"), errp.Context{"reply": errMap})
70-
}
71-
var err error
72-
errCode, err = strconv.ParseFloat(errCodeStr, 64)
73-
if err != nil {
74-
return errp.WithContext(errp.New("Unexpected reply"), errp.Context{"reply": errMap})
75-
}
65+
return errp.WithContext(errp.New("Unexpected reply"), errp.Context{"reply": errMap})
7666
}
7767
return NewError(errMsg, errCode)
7868
}

0 commit comments

Comments
 (0)