revert is_spent changes because booleans suddenly have a single state
present (doesn't matter if true or false) and missing. TIL /s
This commit is contained in:
parent
e00cdd0237
commit
ed51ece75c
2 changed files with 6 additions and 8 deletions
|
@ -220,7 +220,7 @@ func (d *Client) AddressUnused(account *string) (*AddressUnusedResponse, error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Client) ChannelList(account *string, page uint64, pageSize uint64, wid *string, isSpent bool) (*ChannelListResponse, error) {
|
func (d *Client) ChannelList(account *string, page uint64, pageSize uint64, wid *string) (*ChannelListResponse, error) {
|
||||||
if page == 0 {
|
if page == 0 {
|
||||||
return nil, errors.Err("pages start from 1")
|
return nil, errors.Err("pages start from 1")
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,6 @@ func (d *Client) ChannelList(account *string, page uint64, pageSize uint64, wid
|
||||||
return response, d.call(response, "channel_list", map[string]interface{}{
|
return response, d.call(response, "channel_list", map[string]interface{}{
|
||||||
"account_id": account,
|
"account_id": account,
|
||||||
"page": page,
|
"page": page,
|
||||||
"is_spent": isSpent,
|
|
||||||
"page_size": pageSize,
|
"page_size": pageSize,
|
||||||
"include_protobuf": true,
|
"include_protobuf": true,
|
||||||
"wallet_id": wid,
|
"wallet_id": wid,
|
||||||
|
@ -438,12 +437,11 @@ func (d *Client) AddressList(account *string, address *string, page uint64, page
|
||||||
return response, d.call(response, "address_list", structs.Map(args))
|
return response, d.call(response, "address_list", structs.Map(args))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Client) StreamList(account *string, page uint64, pageSize uint64, isSpent bool) (*StreamListResponse, error) {
|
func (d *Client) StreamList(account *string, page uint64, pageSize uint64) (*StreamListResponse, error) {
|
||||||
response := new(StreamListResponse)
|
response := new(StreamListResponse)
|
||||||
err := d.call(response, "stream_list", map[string]interface{}{
|
err := d.call(response, "stream_list", map[string]interface{}{
|
||||||
"account_id": account,
|
"account_id": account,
|
||||||
"include_protobuf": true,
|
"include_protobuf": true,
|
||||||
"is_spent": isSpent,
|
|
||||||
"page": page,
|
"page": page,
|
||||||
"page_size": pageSize,
|
"page_size": pageSize,
|
||||||
})
|
})
|
||||||
|
|
|
@ -107,7 +107,7 @@ func TestClient_AddressUnused(t *testing.T) {
|
||||||
|
|
||||||
func TestClient_ChannelList(t *testing.T) {
|
func TestClient_ChannelList(t *testing.T) {
|
||||||
d := NewClient("")
|
d := NewClient("")
|
||||||
got, err := d.ChannelList(nil, 1, 50, nil, false)
|
got, err := d.ChannelList(nil, 1, 50, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
return
|
return
|
||||||
|
@ -293,7 +293,7 @@ func TestClient_ClaimList(t *testing.T) {
|
||||||
func TestClient_StreamList(t *testing.T) {
|
func TestClient_StreamList(t *testing.T) {
|
||||||
_ = os.Setenv("BLOCKCHAIN_NAME", "lbrycrd_regtest")
|
_ = os.Setenv("BLOCKCHAIN_NAME", "lbrycrd_regtest")
|
||||||
d := NewClient("")
|
d := NewClient("")
|
||||||
got, err := d.StreamList(nil, 1, 20, false)
|
got, err := d.StreamList(nil, 1, 20)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
return
|
return
|
||||||
|
@ -648,7 +648,7 @@ func TestClient_ChannelImport(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
channels, err := d.ChannelList(nil, 1, 50, nil, false)
|
channels, err := d.ChannelList(nil, 1, 50, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
|
@ -690,7 +690,7 @@ func TestClient_ChannelImportWithWalletID(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
channels, err := d.ChannelList(nil, 1, 50, &wallet.ID, false)
|
channels, err := d.ChannelList(nil, 1, 50, &wallet.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue