Commit 873757e 1 parent 4972568 commit 873757e Copy full SHA for 873757e
File tree 1 file changed +18
-0
lines changed
core/src/test/java/bisq/core/fee
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,24 @@ void checkFeeAmountMissingVinPreVoutValue() {
191
191
assertThat (txValidator1 .getStatus (), is (FeeValidationStatus .NACK_JSON_ERROR ));
192
192
}
193
193
194
+ @ Test
195
+ void checkFeeAmountMissingVoutValue () {
196
+ JsonObject json = MakerTxValidatorSanityCheckTests .getValidBtcMakerFeeMempoolJsonResponse ();
197
+ JsonObject firstOutput = json .getAsJsonArray ("vout" ).get (0 ).getAsJsonObject ();
198
+ firstOutput .remove ("value" );
199
+
200
+ boolean hasPreVout = json .getAsJsonArray ("vout" )
201
+ .get (0 ).getAsJsonObject ()
202
+ .has ("value" );
203
+ assertThat (hasPreVout , is (false ));
204
+
205
+ String jsonContent = new Gson ().toJson (json );
206
+ TxValidator txValidator1 = txValidator .parseJsonValidateMakerFeeTx (jsonContent ,
207
+ MakerTxValidatorSanityCheckTests .FEE_RECEIVER_ADDRESSES );
208
+
209
+ assertThat (txValidator1 .getStatus (), is (FeeValidationStatus .NACK_JSON_ERROR ));
210
+ }
211
+
194
212
@ Test
195
213
void responseHasDifferentTxId () {
196
214
String differentTxId = "abcde971ead7d03619e3a9eeaa771ed5adba14c448839e0299f857f7bb4ec07" ;
You can’t perform that action at this time.
0 commit comments