File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,9 @@ export async function castVote(
239239 const castVoteIxs : TransactionInstruction [ ] = [ ]
240240 const pluginCastVoteIxs : TransactionInstruction [ ] = [ ]
241241
242- if ( calculatedVoterWeight !== null && calculatedVoterWeight . gtn ( 0 ) ) {
242+ const isPyth = realm . owner . equals ( new PublicKey ( 'pytGY6tWRgGinSCvRLnSv4fHfBTMoiDGiCsesmHWM6U' ) )
243+
244+ if ( isPyth || ( calculatedVoterWeight !== null && calculatedVoterWeight . gtn ( 0 ) ) ) {
243245 //will run only if any plugin is connected with realm
244246 const plugin = await votingPlugin ?. withCastPluginVote (
245247 pluginCastVoteIxs ,
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export default function useVoteRecords(proposal?: ProgramAccount<Proposal>) {
4646
4747 const { vsrMode, isNftMode } = useRealm ( )
4848
49+ const isPyth = realm ?. pubkey . equals ( new PublicKey ( 'pytGY6tWRgGinSCvRLnSv4fHfBTMoiDGiCsesmHWM6U' ) )
4950 //for vsr
5051 const [ undecidedDepositByVoteRecord , setUndecidedDepositByVoteRecord ] =
5152 useState < { [ walletPk : string ] : BN } > ( { } )
@@ -122,7 +123,7 @@ export default function useVoteRecords(proposal?: ProgramAccount<Proposal>) {
122123 ///
123124
124125 useEffect ( ( ) => {
125- if ( context && proposal && realm ) {
126+ if ( context && proposal && realm && ! isPyth ) {
126127 // fetch vote records
127128 pipe (
128129 ( ) =>
You can’t perform that action at this time.
0 commit comments