Skip to content

Commit 2bd9b0c

Browse files
authored
Merge pull request #158 from filecoin-project/placeholder-fix
Placeholder fix
2 parents 20d0f38 + 9a5d072 commit 2bd9b0c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

fplus-lib/src/core/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ impl LDNApplication {
687687
repo: String,
688688
) -> Result<ApplicationFile, LDNError> {
689689
// Get multisig threshold from blockchain
690-
let blockchain_threshold = match get_multisig_threshold_for_actor("actor_address").await {
690+
let blockchain_threshold = match get_multisig_threshold_for_actor(&signer.signing_address).await {
691691
Ok(threshold) => Some(threshold),
692692
Err(_) => None,
693693
};
@@ -803,7 +803,7 @@ impl LDNApplication {
803803
repo: String,
804804
) -> Result<ApplicationFile, LDNError> {
805805
// Get multisig threshold from blockchain
806-
let blockchain_threshold = match get_multisig_threshold_for_actor("actor_address").await {
806+
let blockchain_threshold = match get_multisig_threshold_for_actor(&signer.signing_address).await {
807807
Ok(threshold) => Some(threshold),
808808
Err(_) => None,
809809
};
@@ -1670,10 +1670,11 @@ impl LDNApplication {
16701670
log::warn!("Not enough signers for approval");
16711671
return Ok(false);
16721672
}
1673+
let signer_index = if multisig_threshold <= 1 { 0 } else { 1 };
16731674

1674-
let signer = signers.0.get(1).unwrap();
1675+
let signer = signers.0.get(signer_index).unwrap();
16751676
let signer_gh_handle = signer.github_username.clone();
1676-
let valid_verifiers =
1677+
let valid_verifiers: ValidVerifierList =
16771678
Self::fetch_verifiers(owner.clone(), repo.clone()).await?;
16781679
if valid_verifiers.is_valid(&signer_gh_handle) {
16791680
log::info!("Val Approval (G)- Validated!");

0 commit comments

Comments
 (0)