Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit e90dc6d

Browse files
committed
Revert back to blocking balance API on startup
1 parent 34cbe53 commit e90dc6d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

api/jsonapi.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import (
2727
"bytes"
2828
"github.com/OpenBazaar/jsonpb"
2929
"github.com/OpenBazaar/openbazaar-go/api/notifications"
30-
"github.com/OpenBazaar/openbazaar-go/bitcoin/bitcoind"
31-
"github.com/OpenBazaar/openbazaar-go/bitcoin/zcashd"
3230
"github.com/OpenBazaar/openbazaar-go/core"
3331
"github.com/OpenBazaar/openbazaar-go/ipfs"
3432
"github.com/OpenBazaar/openbazaar-go/pb"
@@ -779,7 +777,7 @@ func (i *jsonAPIHandler) GETMnemonic(w http.ResponseWriter, r *http.Request) {
779777
}
780778

781779
func (i *jsonAPIHandler) GETBalance(w http.ResponseWriter, r *http.Request) {
782-
_, ok := i.node.Wallet.(*bitcoind.BitcoindWallet)
780+
/*_, ok := i.node.Wallet.(*bitcoind.BitcoindWallet)
783781
if ok {
784782
select {
785783
case <-i.node.Wallet.(*bitcoind.BitcoindWallet).InitChan():
@@ -798,7 +796,7 @@ func (i *jsonAPIHandler) GETBalance(w http.ResponseWriter, r *http.Request) {
798796
ErrorResponse(w, http.StatusServiceUnavailable, "ERROR_WALLET_UNINITIALIZED")
799797
return
800798
}
801-
}
799+
}*/
802800
confirmed, unconfirmed := i.node.Wallet.Balance()
803801
SanitizedResponse(w, fmt.Sprintf(`{"confirmed": %d, "unconfirmed": %d}`, int(confirmed), int(unconfirmed)))
804802
}

0 commit comments

Comments
 (0)