Skip to content

Commit

Permalink
[FIL-411] Fix the same data in request proposed and request approved …
Browse files Browse the repository at this point in the history
…comment (#248)

* Fix the same data in request proposed and request approved comment

* Fix get_last_request_allowance function
  • Loading branch information
Filip-L authored Jan 20, 2025
1 parent 4561c39 commit 5178363
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions fplus-lib/src/core/application/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,7 @@ impl ApplicationFile {
}

pub fn get_last_request_allowance(&self) -> Option<Allocation> {
let request_id = self.lifecycle.active_request.clone()?;
self.allocation.find_one(request_id)
self.allocation.0.last().cloned()
}

pub fn get_active_allocation_signers(&self, request_id: &str) -> Vec<Verifier> {
Expand Down
2 changes: 1 addition & 1 deletion fplus-lib/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3305,7 +3305,7 @@ _(NEW vs OLD)_
datacap_allocation_requested.clone_from(&allocation.amount);
id.clone_from(&allocation.id);

if let Some(first_verifier) = allocation.signers.0.first() {
if let Some(first_verifier) = allocation.signers.0.last() {
signing_address.clone_from(&first_verifier.signing_address);
message_cid.clone_from(&first_verifier.message_cid);
increase_allowance_cid = first_verifier.increase_allowance_cid.clone();
Expand Down

0 comments on commit 5178363

Please sign in to comment.