Skip to content

Commit

Permalink
fix: atomic swap (#6360)
Browse files Browse the repository at this point in the history
Description
---
Fixes atomic swap

Motivation and Context
---
Atomic swap should use the existing on chain rangeproof and not generate
a new one.
  • Loading branch information
SWvheerden committed May 30, 2024
1 parent c24cc15 commit 01f93ab
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions base_layer/wallet/src/output_manager_service/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2096,7 +2096,7 @@ where
{
if output.verify_mask(&self.resources.factories.range_proof, &spending_key, amount.as_u64())? {
let spending_key_id = self.resources.key_manager.import_key(spending_key).await?;
let rewound_output = WalletOutput::new(
let rewound_output = WalletOutput::new_with_rangeproof(
output.version,
amount,
spending_key_id,
Expand All @@ -2112,9 +2112,8 @@ where
output.covenant,
output.encrypted_data,
output.minimum_value_promise,
&self.resources.key_manager,
)
.await?;
output.proof,
);

let message = "SHA-XTR atomic swap".to_string();

Expand Down

0 comments on commit 01f93ab

Please sign in to comment.