From 8fa723655bafc8b5125e3afd51af1c8416337698 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Wed, 16 Oct 2024 15:12:16 -0700 Subject: [PATCH 1/3] Fix bug where no voting power when you have proxy voting power --- ios/HeliumWallet.xcodeproj/project.pbxproj | 12 ++++++------ package.json | 2 +- src/features/governance/ProposalScreen.tsx | 4 ++-- src/features/governance/VotingPowerCard.tsx | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ios/HeliumWallet.xcodeproj/project.pbxproj b/ios/HeliumWallet.xcodeproj/project.pbxproj index 256260da1..1a8d3de4b 100644 --- a/ios/HeliumWallet.xcodeproj/project.pbxproj +++ b/ios/HeliumWallet.xcodeproj/project.pbxproj @@ -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)", @@ -1117,7 +1117,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.9.0; + MARKETING_VERSION = 2.9.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -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"; @@ -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; @@ -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"; @@ -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; diff --git a/package.json b/package.json index 18ab4993b..bbcac0735 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/features/governance/ProposalScreen.tsx b/src/features/governance/ProposalScreen.tsx index 18e998c29..dd2a564dd 100644 --- a/src/features/governance/ProposalScreen.tsx +++ b/src/features/governance/ProposalScreen.tsx @@ -70,7 +70,7 @@ export const ProposalScreen = () => { ) const { anchorProvider } = useSolana() const { walletSignBottomSheetRef } = useWalletSign() - const { mint, loading, amountLocked } = useGovernance() + const { mint, loading, amountLocked, votingPower } = useGovernance() const handleBrowseVoters = useCallback(() => { navigation.navigate('VotersScreen', { mint: mint.toBase58(), @@ -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' && diff --git a/src/features/governance/VotingPowerCard.tsx b/src/features/governance/VotingPowerCard.tsx index 9b8153ba7..91b31dde4 100644 --- a/src/features/governance/VotingPowerCard.tsx +++ b/src/features/governance/VotingPowerCard.tsx @@ -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 From b1671d2ea872be1aeb05c0ec847e72963b8e4e30 Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 17 Oct 2024 07:18:45 -0700 Subject: [PATCH 2/3] Lint --- src/features/governance/ProposalScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/governance/ProposalScreen.tsx b/src/features/governance/ProposalScreen.tsx index dd2a564dd..8c6e9a85c 100644 --- a/src/features/governance/ProposalScreen.tsx +++ b/src/features/governance/ProposalScreen.tsx @@ -70,7 +70,7 @@ export const ProposalScreen = () => { ) const { anchorProvider } = useSolana() const { walletSignBottomSheetRef } = useWalletSign() - const { mint, loading, amountLocked, votingPower } = useGovernance() + const { mint, loading, votingPower } = useGovernance() const handleBrowseVoters = useCallback(() => { navigation.navigate('VotersScreen', { mint: mint.toBase58(), From fe2fe2cf7c0cd3a14870ef86735cd5ca9e1d130d Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Thu, 17 Oct 2024 11:03:23 -0700 Subject: [PATCH 3/3] Bump marketing --- ios/HeliumWallet.xcodeproj/project.pbxproj | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/HeliumWallet.xcodeproj/project.pbxproj b/ios/HeliumWallet.xcodeproj/project.pbxproj index 1a8d3de4b..451d12700 100644 --- a/ios/HeliumWallet.xcodeproj/project.pbxproj +++ b/ios/HeliumWallet.xcodeproj/project.pbxproj @@ -1079,7 +1079,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.9.1; + MARKETING_VERSION = 2.10.0; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", @@ -1117,7 +1117,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.9.1; + MARKETING_VERSION = 2.10.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1303,7 +1303,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.9.1; + MARKETING_VERSION = 2.10.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; @@ -1348,7 +1348,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.9.1; + MARKETING_VERSION = 2.10.0; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.helium.wallet.app.OneSignalNotificationServiceExtension; @@ -1396,7 +1396,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.9.1; + MARKETING_VERSION = 2.10.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; @@ -1445,7 +1445,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.9.1; + MARKETING_VERSION = 2.10.0; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = com.helium.wallet.app.HeliumWalletWidget; diff --git a/package.json b/package.json index 39c29948e..56c68acb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "helium-wallet", - "version": "2.9.1", + "version": "2.10.0", "private": true, "scripts": { "postinstall": "patch-package && ./node_modules/.bin/rn-nodeify --hack --install && npx jetify",