Skip to content

Commit

Permalink
Next
Browse files Browse the repository at this point in the history
  • Loading branch information
guibescos committed Nov 16, 2023
1 parent e24e507 commit 057a403
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions hooks/queries/governancePower.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ export const findPluginName = (programId: PublicKey | undefined) =>
: NFT_PLUGINS_PKS.includes(programId.toString())
? 'NFT'
: GATEWAY_PLUGINS_PKS.includes(programId.toString())
? 'gateway'
? 'gateway'
: PYTH_PLUGIN_PK.includes(programId.toString())
? 'pyth'
: 'unknown'

export const determineVotingPowerType = async (
Expand All @@ -147,19 +149,7 @@ export const determineVotingPowerType = async (
? config.result?.account.communityTokenConfig.voterWeightAddin
: config.result?.account.councilTokenConfig.voterWeightAddin

return programId === undefined
? ('vanilla' as const)
: VSR_PLUGIN_PKS.includes(programId.toString())
? ('VSR' as const)
: HELIUM_VSR_PLUGINS_PKS.includes(programId.toString())
? 'HeliumVSR'
: NFT_PLUGINS_PKS.includes(programId.toString())
? 'NFT'
: GATEWAY_PLUGINS_PKS.includes(programId.toString())
? 'gateway'
: PYTH_PLUGIN_PK.includes(programId.toString())
? 'pyth'
: 'unknown'
return findPluginName(programId)
}

export const useGovernancePowerAsync = (
Expand Down

0 comments on commit 057a403

Please sign in to comment.