Skip to content

Commit 5ae41c7

Browse files
committed
add dcr recipient and mempool txs
1 parent 2da142f commit 5ae41c7

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

client/asset/btc/btc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4497,7 +4497,7 @@ func (btc *baseWallet) NewAddress() (string, error) {
44974497

44984498
// AddressUsed checks if a wallet address has been used.
44994499
func (btc *baseWallet) AddressUsed(addrStr string) (bool, error) {
4500-
return btc.node.addressUsed(addrStr)
4500+
return btc.node.AddressUsed(addrStr)
45014501
}
45024502

45034503
// Withdraw withdraws funds to the specified address. Fees are subtracted from

client/asset/btc/electrum_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ func (ew *electrumWallet) findOutputSpender(ctx context.Context, txHash *chainha
12121212
return nil, 0, nil // caller should check msgTx (internal method)
12131213
}
12141214

1215-
func (ew *electrumWallet) addressUsed(addrStr string) (bool, error) {
1215+
func (ew *electrumWallet) AddressUsed(addrStr string) (bool, error) {
12161216
txs, err := ew.wallet.GetAddressHistory(ew.ctx, addrStr)
12171217
if err != nil {
12181218
return false, fmt.Errorf("error getting address history: %w", err)

client/asset/btc/rpcclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ func SearchBlockForRedemptions(
11811181
return
11821182
}
11831183

1184-
func (wc *rpcClient) addressUsed(addr string) (bool, error) {
1184+
func (wc *rpcClient) AddressUsed(addr string) (bool, error) {
11851185
var recv float64
11861186
const minConf = 0
11871187
if err := wc.call(methodGetReceivedByAddress, []any{addr, minConf}, &recv); err != nil {

client/asset/btc/spv_wrapper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ func (w *spvWallet) GetWalletTransaction(txHash *chainhash.Hash) (*GetTransactio
13161316
*/
13171317
}
13181318

1319-
func (w *spvWallet) addressUsed(addrStr string) (bool, error) {
1319+
func (w *spvWallet) AddressUsed(addrStr string) (bool, error) {
13201320
addr, err := w.decodeAddr(addrStr, w.chainParams)
13211321
if err != nil {
13221322
return false, fmt.Errorf("error decoding address: %w", err)

client/webserver/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ func (s *WebServer) apiAddressUsed(w http.ResponseWriter, r *http.Request) {
627627
}{
628628
OK: true,
629629
Used: used,
630-
}, s.indent)
630+
})
631631
}
632632

633633
// apiConnectWallet is the handler for the '/connectwallet' API request.

client/webserver/site/src/html/forms.tmpl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,11 @@
135135
<div id="unifiedReceivers" class="d-flex align-items-stretch">
136136
<div id="unifiedReceiverTmpl" class="p-1 me-2 hoverbg lh1 fs15 pointer brdr selectable"></div>
137137
</div>
138-
<div id="newDepAddrBttnBox" class="flex-stretch-column">
139-
<button id="newDepAddrBttn" type="button" class="feature">[[[New Address]]]</button>
140-
</div>
141-
<div id="addrUsed" class="mt-3 fs15 grey">
138+
<div id="addrUsed" class="my-1 text-center fs15 grey lh1 text-warning">
142139
[[[address has been used]]]
143140
</div>
144-
<div class="my-3">
145-
<button id="newDepAddrBttn" type="button" class=" px-2 justify-content-center fs15 bg2 selected">[[[New Deposit Address]]]</button>
141+
<div id="newDepAddrBttnBox" class="flex-stretch-column">
142+
<button id="newDepAddrBttn" type="button" class="feature">[[[New Address]]]</button>
146143
</div>
147144
<div class="fs15 text-center d-hide text-danger text-break" id="depositErr"></div>
148145
{{end}}

0 commit comments

Comments
 (0)