Skip to content

Commit bbc06bb

Browse files
committed
Use NOT_ENOUGH_MONEY for receive FeeTooHigh error
Perhaps it can be extended to reveal preferences about appropriate feerates with a template, but for now this at least uses the well known error code as intended.
1 parent 0e7ce7d commit bbc06bb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

payjoin/src/receive/error.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use std::{error, fmt};
22

3-
use crate::error_codes::{ORIGINAL_PSBT_REJECTED, UNAVAILABLE, VERSION_UNSUPPORTED};
3+
use crate::error_codes::{
4+
NOT_ENOUGH_MONEY, ORIGINAL_PSBT_REJECTED, UNAVAILABLE, VERSION_UNSUPPORTED,
5+
};
46
#[cfg(feature = "v1")]
57
use crate::receive::v1;
68
#[cfg(feature = "v2")]
@@ -229,7 +231,7 @@ impl JsonError for PayloadError {
229231
InputWeight(_) => serialize_json_error(ORIGINAL_PSBT_REJECTED, self),
230232
InputSeen(_) => serialize_json_error(ORIGINAL_PSBT_REJECTED, self),
231233
PsbtBelowFeeRate(_, _) => serialize_json_error(ORIGINAL_PSBT_REJECTED, self),
232-
FeeTooHigh(_, _) => serialize_json_error(ORIGINAL_PSBT_REJECTED, self),
234+
FeeTooHigh(_, _) => serialize_json_error(NOT_ENOUGH_MONEY, self),
233235
}
234236
}
235237
}

0 commit comments

Comments
 (0)