Skip to content

Commit

Permalink
Use NOT_ENOUGH_MONEY for receive FeeTooHigh error
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DanGould committed Jan 24, 2025
1 parent 0e7ce7d commit 2a6a042
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions payjoin/src/receive/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{error, fmt};

use crate::error_codes::{ORIGINAL_PSBT_REJECTED, UNAVAILABLE, VERSION_UNSUPPORTED};
use crate::error_codes::{NOT_ENOUGH_MONEY, ORIGINAL_PSBT_REJECTED, UNAVAILABLE, VERSION_UNSUPPORTED};
#[cfg(feature = "v1")]
use crate::receive::v1;
#[cfg(feature = "v2")]
Expand Down Expand Up @@ -229,7 +229,7 @@ impl JsonError for PayloadError {
InputWeight(_) => serialize_json_error(ORIGINAL_PSBT_REJECTED, self),
InputSeen(_) => serialize_json_error(ORIGINAL_PSBT_REJECTED, self),
PsbtBelowFeeRate(_, _) => serialize_json_error(ORIGINAL_PSBT_REJECTED, self),
FeeTooHigh(_, _) => serialize_json_error(ORIGINAL_PSBT_REJECTED, self),
FeeTooHigh(_, _) => serialize_json_error(NOT_ENOUGH_MONEY, self),
}
}
}
Expand Down

0 comments on commit 2a6a042

Please sign in to comment.