Skip to content
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

Fix proposal execute button - fixing the math for isApproved #842

Merged

Conversation

Viterbo
Copy link
Collaborator

@Viterbo Viterbo commented Apr 4, 2024

Fixes #835, #841

Description

This PR repairs the login behind the condition of isApproved. it also fixes a problem with the .env when it's not present (fresh repo clone).

Test scenarios

  • Go to this proposal link (I don't have a Mainnet deployment to show)
  • Get logged in (use a non-BP account)
  • See that it already shows an execution button

or run it locally with this code:

# clone the repo if you don'e have it
git clone https://github.com/telosnetwork/open-block-explorer.git
cd open-block-explorer
# run the correct branch
git fetch origin
git checkout 835-execute-msig-tx-by-non-msig-accounts-on-block-explorer
yarn
yarn dev

make sure you have the file .env with this code:

APP_NAME=OBE
CHAIN_NAME=telos

then visit http://localhost:8080/proposal/aprfeeburn

image

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have cleaned up the code in the areas my change touches
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have removed any unnecessary console messages
  • I have included all english text to the translation file and/or created a new issue with the required translations for the currently supported languages
  • I have tested for mobile functionality and responsiveness
  • I have added appropriate test coverage
  • I have updated relevant documentation and/or opened a separate issue to cover the updates (Issue URL: )

@Viterbo Viterbo self-assigned this Apr 4, 2024
Copy link

netlify bot commented Apr 4, 2024

Deploy Preview for obe-testnet ready!

Name Link
🔨 Latest commit f88529d
🔍 Latest deploy log https://app.netlify.com/sites/obe-testnet/deploys/660f1e8dffe3380008f090f1
😎 Deploy Preview https://deploy-preview-842--obe-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 4, 2024

Deploy Preview for obe-staging ready!

Name Link
🔨 Latest commit f88529d
🔍 Latest deploy log https://app.netlify.com/sites/obe-staging/deploys/660f1e8da6504e00086f98d0
😎 Deploy Preview https://deploy-preview-842--obe-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Viterbo Viterbo requested a review from pmjanus April 4, 2024 21:53
Comment on lines +108 to +116
if (fromMainnet) {
return fromMainnet;
} else {
if (typeof chainName === 'string') {
throw new Error(`Chain '${chainName}' not found`);
} else {
throw new Error('CHAIN_NAME env variable not found');
}
}
Copy link
Collaborator Author

@Viterbo Viterbo Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes #841

@pmjanus pmjanus changed the base branch from develop to master April 17, 2024 12:47
@pmjanus pmjanus merged commit be55d9d into master Apr 17, 2024
10 checks passed
@Viterbo Viterbo linked an issue Apr 17, 2024 that may be closed by this pull request
@pmjanus pmjanus deleted the 835-execute-msig-tx-by-non-msig-accounts-on-block-explorer branch April 17, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Execute MSIG tx by non MSIG Accounts on Block Explorer
2 participants