diff --git a/Makefile b/Makefile index e732545..b09ca72 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ check: unit unit: @$(call print, "Running unit tests.") - $(GOLIST) | $(XARGS) env $(GOTEST) + $(GOLIST) | $(XARGS) env $(GOTEST) -test.timeout=20m unit-cover: $(GOACC_BIN) @$(call print, "Running unit coverage tests.") @@ -89,7 +89,7 @@ unit-cover: $(GOACC_BIN) unit-race: @$(call print, "Running unit race tests.") - env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOLIST) | $(XARGS) env $(GOTEST) -race + env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOLIST) | $(XARGS) env $(GOTEST) -race -test.timeout=20m # ========= # UTILITIES diff --git a/internal/prompt/prompt.go b/internal/prompt/prompt.go index b967803..88730bf 100644 --- a/internal/prompt/prompt.go +++ b/internal/prompt/prompt.go @@ -2,6 +2,8 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. +// +build !js + package prompt import ( diff --git a/internal/prompt/prompt_js.go b/internal/prompt/prompt_js.go new file mode 100644 index 0000000..674119d --- /dev/null +++ b/internal/prompt/prompt_js.go @@ -0,0 +1,32 @@ +// Copyright (c) 2015-2021 The btcsuite developers +// Use of this source code is governed by an ISC +// license that can be found in the LICENSE file. + +package prompt + +import ( + "bufio" + "fmt" + + "github.com/btcsuite/btcwallet/internal/legacy/keystore" +) + +func ProvideSeed() ([]byte, error) { + return nil, fmt.Errorf("prompt not supported in WebAssembly") +} + +func ProvidePrivPassphrase() ([]byte, error) { + return nil, fmt.Errorf("prompt not supported in WebAssembly") +} + +func PrivatePass(_ *bufio.Reader, _ *keystore.Store) ([]byte, error) { + return nil, fmt.Errorf("prompt not supported in WebAssembly") +} + +func PublicPass(_ *bufio.Reader, _, _, _ []byte) ([]byte, error) { + return nil, fmt.Errorf("prompt not supported in WebAssembly") +} + +func Seed(_ *bufio.Reader) ([]byte, error) { + return nil, fmt.Errorf("prompt not supported in WebAssembly") +}