From 5cc67447a66dee5f1e9e6a565d7833dcc78791e3 Mon Sep 17 00:00:00 2001 From: fuyangpengqi <995764973@qq.com> Date: Tue, 18 Feb 2025 11:48:02 +0800 Subject: [PATCH] refactor: use a more straightforward return value Signed-off-by: fuyangpengqi <995764973@qq.com> --- client/asset/btc/btc.go | 2 +- client/asset/btc/spv_wrapper.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/asset/btc/btc.go b/client/asset/btc/btc.go index 0e09d5cf82..3eb756e119 100644 --- a/client/asset/btc/btc.go +++ b/client/asset/btc/btc.go @@ -624,7 +624,7 @@ func (d *Driver) DecodeCoinID(coinID []byte) (string, error) { if err != nil { return "", err } - return fmt.Sprintf("%v:%d", txid, vout), err + return fmt.Sprintf("%v:%d", txid, vout), nil } // Info returns basic information about the wallet and asset. diff --git a/client/asset/btc/spv_wrapper.go b/client/asset/btc/spv_wrapper.go index 61477a69c5..d985944e0b 100644 --- a/client/asset/btc/spv_wrapper.go +++ b/client/asset/btc/spv_wrapper.go @@ -361,7 +361,7 @@ func (w *spvWallet) getChainHeight() (int32, error) { if err != nil { return -1, err } - return blk.Height, err + return blk.Height, nil } func (w *spvWallet) peerCount() (uint32, error) {