@@ -206,7 +206,7 @@ func (c *Client) ListUnspentMinMaxAsync(minConf, maxConf int) FutureListUnspentR
206
206
func (c * Client ) ListUnspentMinMaxAddressesAsync (minConf , maxConf int , addrs []cashutil.Address ) FutureListUnspentResult {
207
207
addrStrs := make ([]string , 0 , len (addrs ))
208
208
for _ , a := range addrs {
209
- addrStrs = append (addrStrs , a .EncodeAddress ())
209
+ addrStrs = append (addrStrs , a .EncodeAddress (true ))
210
210
}
211
211
212
212
cmd := btcjson .NewListUnspentCmd (& minConf , & maxConf , & addrStrs )
@@ -471,7 +471,7 @@ func (r FutureSendToAddressResult) Receive() (*chainhash.Hash, error) {
471
471
//
472
472
// See SendToAddress for the blocking version and more details.
473
473
func (c * Client ) SendToAddressAsync (address cashutil.Address , amount cashutil.Amount ) FutureSendToAddressResult {
474
- addr := address .EncodeAddress ()
474
+ addr := address .EncodeAddress (true )
475
475
cmd := btcjson .NewSendToAddressCmd (addr , amount .ToBCH (), nil , nil )
476
476
return c .sendCmd (cmd )
477
477
}
@@ -497,7 +497,7 @@ func (c *Client) SendToAddressCommentAsync(address cashutil.Address,
497
497
amount cashutil.Amount , comment ,
498
498
commentTo string ) FutureSendToAddressResult {
499
499
500
- addr := address .EncodeAddress ()
500
+ addr := address .EncodeAddress (true )
501
501
cmd := btcjson .NewSendToAddressCmd (addr , amount .ToBCH (), & comment ,
502
502
& commentTo )
503
503
return c .sendCmd (cmd )
@@ -550,7 +550,7 @@ func (r FutureSendFromResult) Receive() (*chainhash.Hash, error) {
550
550
//
551
551
// See SendFrom for the blocking version and more details.
552
552
func (c * Client ) SendFromAsync (fromAccount string , toAddress cashutil.Address , amount cashutil.Amount ) FutureSendFromResult {
553
- addr := toAddress .EncodeAddress ()
553
+ addr := toAddress .EncodeAddress (true )
554
554
cmd := btcjson .NewSendFromCmd (fromAccount , addr , amount .ToBCH (), nil ,
555
555
nil , nil )
556
556
return c .sendCmd (cmd )
@@ -574,7 +574,7 @@ func (c *Client) SendFrom(fromAccount string, toAddress cashutil.Address, amount
574
574
//
575
575
// See SendFromMinConf for the blocking version and more details.
576
576
func (c * Client ) SendFromMinConfAsync (fromAccount string , toAddress cashutil.Address , amount cashutil.Amount , minConfirms int ) FutureSendFromResult {
577
- addr := toAddress .EncodeAddress ()
577
+ addr := toAddress .EncodeAddress (true )
578
578
cmd := btcjson .NewSendFromCmd (fromAccount , addr , amount .ToBCH (),
579
579
& minConfirms , nil , nil )
580
580
return c .sendCmd (cmd )
@@ -603,7 +603,7 @@ func (c *Client) SendFromCommentAsync(fromAccount string,
603
603
toAddress cashutil.Address , amount cashutil.Amount , minConfirms int ,
604
604
comment , commentTo string ) FutureSendFromResult {
605
605
606
- addr := toAddress .EncodeAddress ()
606
+ addr := toAddress .EncodeAddress (true )
607
607
cmd := btcjson .NewSendFromCmd (fromAccount , addr , amount .ToBCH (),
608
608
& minConfirms , & comment , & commentTo )
609
609
return c .sendCmd (cmd )
@@ -660,7 +660,7 @@ func (r FutureSendManyResult) Receive() (*chainhash.Hash, error) {
660
660
func (c * Client ) SendManyAsync (fromAccount string , amounts map [cashutil.Address ]cashutil.Amount ) FutureSendManyResult {
661
661
convertedAmounts := make (map [string ]float64 , len (amounts ))
662
662
for addr , amount := range amounts {
663
- convertedAmounts [addr .EncodeAddress ()] = amount .ToBCH ()
663
+ convertedAmounts [addr .EncodeAddress (true )] = amount .ToBCH ()
664
664
}
665
665
cmd := btcjson .NewSendManyCmd (fromAccount , convertedAmounts , nil , nil )
666
666
return c .sendCmd (cmd )
@@ -689,7 +689,7 @@ func (c *Client) SendManyMinConfAsync(fromAccount string,
689
689
690
690
convertedAmounts := make (map [string ]float64 , len (amounts ))
691
691
for addr , amount := range amounts {
692
- convertedAmounts [addr .EncodeAddress ()] = amount .ToBCH ()
692
+ convertedAmounts [addr .EncodeAddress (true )] = amount .ToBCH ()
693
693
}
694
694
cmd := btcjson .NewSendManyCmd (fromAccount , convertedAmounts ,
695
695
& minConfirms , nil )
@@ -723,7 +723,7 @@ func (c *Client) SendManyCommentAsync(fromAccount string,
723
723
724
724
convertedAmounts := make (map [string ]float64 , len (amounts ))
725
725
for addr , amount := range amounts {
726
- convertedAmounts [addr .EncodeAddress ()] = amount .ToBCH ()
726
+ convertedAmounts [addr .EncodeAddress (true )] = amount .ToBCH ()
727
727
}
728
728
cmd := btcjson .NewSendManyCmd (fromAccount , convertedAmounts ,
729
729
& minConfirms , & comment )
@@ -972,7 +972,7 @@ func (r FutureGetAccountResult) Receive() (string, error) {
972
972
//
973
973
// See GetAccount for the blocking version and more details.
974
974
func (c * Client ) GetAccountAsync (address cashutil.Address ) FutureGetAccountResult {
975
- addr := address .EncodeAddress ()
975
+ addr := address .EncodeAddress (true )
976
976
cmd := btcjson .NewGetAccountCmd (addr )
977
977
return c .sendCmd (cmd )
978
978
}
@@ -999,7 +999,7 @@ func (r FutureSetAccountResult) Receive() error {
999
999
//
1000
1000
// See SetAccount for the blocking version and more details.
1001
1001
func (c * Client ) SetAccountAsync (address cashutil.Address , account string ) FutureSetAccountResult {
1002
- addr := address .EncodeAddress ()
1002
+ addr := address .EncodeAddress (true )
1003
1003
cmd := btcjson .NewSetAccountCmd (addr , account )
1004
1004
return c .sendCmd (cmd )
1005
1005
}
@@ -1202,7 +1202,7 @@ func (r FutureValidateAddressResult) Receive() (*btcjson.ValidateAddressWalletRe
1202
1202
//
1203
1203
// See ValidateAddress for the blocking version and more details.
1204
1204
func (c * Client ) ValidateAddressAsync (address cashutil.Address ) FutureValidateAddressResult {
1205
- addr := address .EncodeAddress ()
1205
+ addr := address .EncodeAddress (true )
1206
1206
cmd := btcjson .NewValidateAddressCmd (addr )
1207
1207
return c .sendCmd (cmd )
1208
1208
}
@@ -1575,7 +1575,7 @@ func (r FutureGetReceivedByAddressResult) Receive() (cashutil.Amount, error) {
1575
1575
//
1576
1576
// See GetReceivedByAddress for the blocking version and more details.
1577
1577
func (c * Client ) GetReceivedByAddressAsync (address cashutil.Address ) FutureGetReceivedByAddressResult {
1578
- addr := address .EncodeAddress ()
1578
+ addr := address .EncodeAddress (true )
1579
1579
cmd := btcjson .NewGetReceivedByAddressCmd (addr , nil )
1580
1580
return c .sendCmd (cmd )
1581
1581
@@ -1596,7 +1596,7 @@ func (c *Client) GetReceivedByAddress(address cashutil.Address) (cashutil.Amount
1596
1596
//
1597
1597
// See GetReceivedByAddressMinConf for the blocking version and more details.
1598
1598
func (c * Client ) GetReceivedByAddressMinConfAsync (address cashutil.Address , minConfirms int ) FutureGetReceivedByAddressResult {
1599
- addr := address .EncodeAddress ()
1599
+ addr := address .EncodeAddress (true )
1600
1600
cmd := btcjson .NewGetReceivedByAddressCmd (addr , & minConfirms )
1601
1601
return c .sendCmd (cmd )
1602
1602
}
@@ -1885,7 +1885,7 @@ func (r FutureSignMessageResult) Receive() (string, error) {
1885
1885
//
1886
1886
// See SignMessage for the blocking version and more details.
1887
1887
func (c * Client ) SignMessageAsync (address cashutil.Address , message string ) FutureSignMessageResult {
1888
- addr := address .EncodeAddress ()
1888
+ addr := address .EncodeAddress (true )
1889
1889
cmd := btcjson .NewSignMessageCmd (addr , message )
1890
1890
return c .sendCmd (cmd )
1891
1891
}
@@ -1926,7 +1926,7 @@ func (r FutureVerifyMessageResult) Receive() (bool, error) {
1926
1926
//
1927
1927
// See VerifyMessage for the blocking version and more details.
1928
1928
func (c * Client ) VerifyMessageAsync (address cashutil.Address , signature , message string ) FutureVerifyMessageResult {
1929
- addr := address .EncodeAddress ()
1929
+ addr := address .EncodeAddress (true )
1930
1930
cmd := btcjson .NewVerifyMessageCmd (addr , signature , message )
1931
1931
return c .sendCmd (cmd )
1932
1932
}
@@ -1972,7 +1972,7 @@ func (r FutureDumpPrivKeyResult) Receive() (*cashutil.WIF, error) {
1972
1972
//
1973
1973
// See DumpPrivKey for the blocking version and more details.
1974
1974
func (c * Client ) DumpPrivKeyAsync (address cashutil.Address ) FutureDumpPrivKeyResult {
1975
- addr := address .EncodeAddress ()
1975
+ addr := address .EncodeAddress (true )
1976
1976
cmd := btcjson .NewDumpPrivKeyCmd (addr )
1977
1977
return c .sendCmd (cmd )
1978
1978
}
0 commit comments