Skip to content

Commit 27e673f

Browse files
author
bold
committed
don't omit broadcast if false
1 parent c004e35 commit 27e673f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/wallet/wallet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ type SendMoneyRequest struct {
138138
FeeNQT int64 `url:"feeNQT,string"`
139139
Deadline uint `url:"deadline"`
140140
ReferencedTransactionFullHash string `url:"referencedTransactionFullHash,omitempty"`
141-
Broadcast bool `url:"broadcast,omitempty"`
141+
Broadcast bool `url:"broadcast"`
142142
SecretPhrase string `url:"secretPhrase"`
143143
res SendMoneyReply
144144
}
@@ -168,7 +168,7 @@ type SendMoneyMultiRequest struct {
168168
FeeNQT int64 `url:"feeNQT,string"`
169169
Deadline uint `url:"deadline"`
170170
ReferencedTransactionFullHash string `url:"referencedTransactionFullHash,omitempty"`
171-
Broadcast bool `url:"broadcast,omitempty"`
171+
Broadcast bool `url:"broadcast"`
172172
SecretPhrase string `url:"secretPhrase"`
173173
res SendMoneyMultiReply
174174
}

pkg/wallet/wallet_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ func TestBroadcastTransaction(t *testing.T) {
117117
Broadcast: false})
118118
if assert.Nil(t, err) {
119119
assert.NotEmpty(t, res1.TxID)
120+
assert.False(t, res1.Broadcasted)
120121
}
121122
res2, err := w.BroadcastTransaction(&BroadcastTransactionRequest{
122123
TransactionBytes: res1.TransactionBytes,

0 commit comments

Comments
 (0)