@@ -76,8 +76,8 @@ pub struct RgbPaymentInfo {
76
76
pub local_rgb_amount : u64 ,
77
77
/// RGB remote amount
78
78
pub remote_rgb_amount : u64 ,
79
- /// Override RGB amount in route
80
- pub override_route_amount : Option < u64 > ,
79
+ /// Whether the RGB amount in route should be overridden
80
+ pub override_route_amount : bool ,
81
81
}
82
82
83
83
/// RGB transfer info
@@ -174,7 +174,7 @@ pub(crate) fn color_commitment(channel_id: &[u8; 32], funding_outpoint: &OutPoin
174
174
amount : htlc. amount_rgb . unwrap ( ) ,
175
175
local_rgb_amount : rgb_info. local_rgb_amount ,
176
176
remote_rgb_amount : rgb_info. remote_rgb_amount ,
177
- override_route_amount : None ,
177
+ override_route_amount : false ,
178
178
} ;
179
179
let serialized_info = serde_json:: to_string ( & rgb_payment_info) . expect ( "valid rgb payment info" ) ;
180
180
fs:: write ( rgb_payment_info_path, serialized_info) . expect ( "able to write rgb payment info file" ) ;
@@ -520,7 +520,7 @@ pub fn write_rgb_channel_info(path: &PathBuf, rgb_info: &RgbInfo) {
520
520
}
521
521
522
522
/// Write RGB payment info to file
523
- pub fn write_rgb_payment_info_file ( ldk_data_dir : & Path , payment_hash : & PaymentHash , contract_id : ContractId , amount_rgb : u64 , override_route_amount : Option < u64 > ) {
523
+ pub fn write_rgb_payment_info_file ( ldk_data_dir : & Path , payment_hash : & PaymentHash , contract_id : ContractId , amount_rgb : u64 , override_route_amount : bool ) {
524
524
let rgb_payment_info_path = ldk_data_dir. join ( hex:: encode ( payment_hash. 0 ) ) ;
525
525
let rgb_payment_info = RgbPaymentInfo {
526
526
contract_id,
0 commit comments