Skip to content

Commit

Permalink
Merge branch 'sp-error'
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Sep 18, 2024
2 parents d02c777 + 700ab05 commit 2221e98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions api/firmware/btc.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ func (device *Device) BTCSign(
}
}

if containsSilentPaymentOutputs && !device.version.AtLeast(semver.NewSemVer(9, 21, 0)) {
return nil, nil, UnsupportedError("9.21.0")
}

signatures := make([][]byte, len(tx.Inputs))
next, err := device.queryBtcSign(&messages.Request{
Request: &messages.Request_BtcSignInit{
Expand Down
2 changes: 1 addition & 1 deletion api/firmware/btc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ func TestSimulatorBTCSignSilentPayment(t *testing.T) {
generatedOutputs,
)
} else {
require.Error(t, err)
require.EqualError(t, err, UnsupportedError("9.21.0").Error())
}
})
}

0 comments on commit 2221e98

Please sign in to comment.