Skip to content

Commit e91a116

Browse files
Filip-Lfilip-neti
andauthored
Update application when threshold 1 (#239)
Co-authored-by: Filip Lelek <[email protected]>
1 parent 95796ad commit e91a116

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

fplus-lib/src/core/mod.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ impl LDNApplication {
12191219
SpsChangeRequest::new(&request_id, allowed_sps, max_deviation, &signer, false);
12201220
if let Some(active_allocation) = app_file.allocation.active() {
12211221
app_state = AppState::ReadyToSign;
1222-
app_file.handle_changing_sps_request(
1222+
app_file = app_file.handle_changing_sps_request(
12231223
&signer.github_username,
12241224
&sps_change_request,
12251225
&app_state,
@@ -1228,7 +1228,7 @@ impl LDNApplication {
12281228
} else {
12291229
app_state = AppState::Granted;
12301230
let request_id = uuidv4::uuid::v4();
1231-
app_file.handle_changing_sps_request(
1231+
app_file = app_file.handle_changing_sps_request(
12321232
&signer.github_username,
12331233
&sps_change_request,
12341234
&app_state,
@@ -1250,6 +1250,12 @@ impl LDNApplication {
12501250
"Application is in the Changing Storage Providers state. Waiting for approval.";
12511251
}
12521252

1253+
let commit_message = if threshold_to_use < 2 {
1254+
"Update Storage Providers".to_string()
1255+
} else {
1256+
"Start signing allowed storage providers".to_string()
1257+
};
1258+
12531259
if app_state_before_change == AppState::ReadyToSign {
12541260
self.update_and_commit_application_state(
12551261
app_file.clone(),
@@ -1258,7 +1264,7 @@ impl LDNApplication {
12581264
self.file_sha.clone(),
12591265
self.branch_name.clone(),
12601266
self.file_name.clone(),
1261-
"Start signing allowed storage providers".to_string(),
1267+
commit_message,
12621268
)
12631269
.await?;
12641270
} else {

0 commit comments

Comments
 (0)