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 bug where no voting power when you have proxy voting power #817

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ios/HeliumWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -1117,7 +1117,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1303,7 +1303,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
Expand Down Expand Up @@ -1348,7 +1348,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.helium.wallet.app.OneSignalNotificationServiceExtension;
Expand Down Expand Up @@ -1396,7 +1396,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
Expand Down Expand Up @@ -1445,7 +1445,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.helium.wallet.app.HeliumWalletWidget;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "helium-wallet",
"version": "2.9.0",
"version": "2.9.1",
"private": true,
"scripts": {
"postinstall": "patch-package && ./node_modules/.bin/rn-nodeify --hack --install && npx jetify",
Expand Down
4 changes: 2 additions & 2 deletions src/features/governance/ProposalScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const ProposalScreen = () => {
)
const { anchorProvider } = useSolana()
const { walletSignBottomSheetRef } = useWalletSign()
const { mint, loading, amountLocked } = useGovernance()
const { mint, loading, votingPower } = useGovernance()
const handleBrowseVoters = useCallback(() => {
navigation.navigate('VotersScreen', {
mint: mint.toBase58(),
Expand Down Expand Up @@ -269,7 +269,7 @@ export const ProposalScreen = () => {
))

const completed = endTs && endTs.toNumber() <= Date.now().valueOf() / 1000
const noVotingPower = !loading && (!amountLocked || amountLocked.isZero())
const noVotingPower = !loading && (!votingPower || votingPower.isZero())
const voted = !voting && voteWeights?.some((n) => n.gt(new BN(0)))
const showVoteResults =
derivedState !== 'cancelled' &&
Expand Down
2 changes: 1 addition & 1 deletion src/features/governance/VotingPowerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const VotingPowerCard = ({
if (onPress) await onPress(mint)
}, [onPress, mint])

const noVotingPower = !loading && (!amountLocked || amountLocked.isZero())
const noVotingPower = !loading && (!votingPower || votingPower.isZero())

const renderCard = (compact = false) => {
if (loading) return <VotingPowerCardSkeleton />
Expand Down
Loading