From a413715aa7b572a460ea88ad1173d93ca51043c7 Mon Sep 17 00:00:00 2001 From: Jesse Schulman Date: Tue, 14 Jan 2025 15:41:42 -0800 Subject: [PATCH] Removing check for showing the execute button, bumping wharfkit to get fixed cleos transaction format --- package.json | 2 +- src/pages/ProposalItem.vue | 7 ++++++- yarn.lock | 8 ++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 009c6ffd..cf09f8da 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@quasar/extras": "^1.13.4", - "@wharfkit/antelope": "1.0.9", + "@wharfkit/antelope": "1.0.10", "@wharfkit/session": "^1.3.1", "@wharfkit/transact-plugin-resource-provider": "^1.1.1", "@wharfkit/wallet-plugin-anchor": "^1.3.4", diff --git a/src/pages/ProposalItem.vue b/src/pages/ProposalItem.vue index c70cfca7..9526da0b 100644 --- a/src/pages/ProposalItem.vue +++ b/src/pages/ProposalItem.vue @@ -301,7 +301,10 @@ export default defineComponent({ activeProducersApproved.value = activeProducers.value.filter( item => item.status, ); - + // Commenting this out, the logic is bad. + // BPs can be involved in non-BP proposals, so we can't just check if BPs are involved and then assume 2/3 + 1 + // And if no BPs are involved, doesn't mean we need 100% approval, most msigs are 2/3 or 5/7, etc... + /* if (activeProducers.value.length === 0) { // No BPs are involved in the proposal, so we need to 100% of the requested approvals isApproved.value = proposal.provided_approvals.length === totalRequestedApprovals; @@ -310,6 +313,8 @@ export default defineComponent({ const approval = (activeProducers.value.length * 2 / 3) + 1; isApproved.value = activeProducersApproved.value.length >= Math.floor(approval); } + */ + isApproved.value = true; const transactions = await handleTransactionHistory(proposal.block_num); diff --git a/yarn.lock b/yarn.lock index 0aaa5927..0199b981 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2680,10 +2680,10 @@ "@wharfkit/token" "^1.1.2" tslib "^2.1.0" -"@wharfkit/antelope@1.0.9": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@wharfkit/antelope/-/antelope-1.0.9.tgz#87388b8ab86f6f0e63950284661b7e8da16e76a7" - integrity sha512-kqJJmvp+//OG372HELb8IdSMvSZI9u/S6TPiljB5sm3Yl4rRLJL+EV8SxmfuAY/kF5asbHQkW2HWR8L12HXZ6w== +"@wharfkit/antelope@1.0.10": + version "1.0.10" + resolved "https://registry.yarnpkg.com/@wharfkit/antelope/-/antelope-1.0.10.tgz#5c63d6b67a4b62038575cd86ef47edaa8d1f57dd" + integrity sha512-12m4nD6+ZZl+mwzySuFkeiJCOrbXQT6mqg9amr1l/JtRewRdxeN9QTsEoPjE5MCTXbJc84X51KCT71ysglse0Q== dependencies: bn.js "^4.11.9" brorand "^1.1.0"