Type assert GetNewAddressCmd correctly.

This commit is contained in:
Josh Rickmar 2013-11-12 12:40:20 -05:00
parent e761884c53
commit b7aec7f7a1

View file

@ -227,7 +227,7 @@ func NotifyBalances(reply chan []byte) {
// error is returned to the frontend.
func GetNewAddress(frontend chan []byte, icmd btcjson.Cmd) {
// Type assert icmd to access parameters.
cmd, ok := icmd.(*btcjson.GetAddressesByAccountCmd)
cmd, ok := icmd.(*btcjson.GetNewAddressCmd)
if !ok {
ReplyError(frontend, icmd.Id(), &btcjson.ErrInternal)
return