Skip to content

fix: multisig config on Docker #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2024
Merged

fix: multisig config on Docker #472

merged 1 commit into from
Aug 19, 2024

Conversation

luislhl
Copy link
Contributor

@luislhl luislhl commented Aug 16, 2024

Acceptance Criteria

This PR extracts a fix from #450, so I just copied the description from there, which was good enough:

  • Fixing multisig param types: when deploying on some cloud environments (such as GCP Cloud Run), the multisig_seed${x}max_signatures and multisig_seed${x}num_signatures are threated as strings, not integers. When starting the multisig, the comparison made with this params is a exact on ( "===") so it fails. By parsing the params before we can avoid that.

src/controllers/index.controller.js Ln 100-101:

  const mconfig = config.multisig[multisigKey];
    console.log('mconfig', mconfig);
    if (!(mconfig
           && (mconfig.total && mconfig.numSignatures && mconfig.pubkeys)
           && (mconfig.pubkeys.length === mconfig.total)
           && (mconfig.numSignatures <= mconfig.total))) {
      // Missing multisig items
      console.error(`Improperly configured multisig for seed ${multisigKey}.`);
      res.send({
        success: false,
        message: `Improperly configured multisig for seed ${multisigKey}.`
      });
      return;

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@luislhl luislhl requested a review from r4mmer August 16, 2024 16:37
@luislhl luislhl self-assigned this Aug 16, 2024
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.59%. Comparing base (bca21f6) to head (177d555).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #472   +/-   ##
=======================================
  Coverage   89.59%   89.59%           
=======================================
  Files          51       51           
  Lines        2173     2173           
  Branches      413      413           
=======================================
  Hits         1947     1947           
  Misses        209      209           
  Partials       17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@luislhl luislhl merged commit 644508a into master Aug 19, 2024
8 checks passed
@luislhl luislhl deleted the fix/multisig-on-docker branch August 19, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants