Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cctdaniel committed Nov 16, 2023
1 parent a1db6a4 commit ef25a26
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions constants/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ export const DELEGATOR_BATCH_VOTE_SUPPORT_BY_PLUGIN: Record<
HeliumVSR: false,
gateway: false,
NFT: false,
pyth: false,
unknown: false,
}
14 changes: 10 additions & 4 deletions utils/uiTypes/VotePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,16 @@ export class VotingClient {
): Promise<ProgramAddresses | undefined> => {
if (this.noClient) return
const realm = this.realm!
const torAccount = await fetchTokenOwnerRecordByPubkey(
this.client!.stakeConnection.program.provider.connection, // FIX ME
tokenOwnerRecord
)
const torAccount =
this.client instanceof PythClient
? await fetchTokenOwnerRecordByPubkey(
this.client.stakeConnection.program.provider.connection,
tokenOwnerRecord
)
: await fetchTokenOwnerRecordByPubkey(
this.client!.program.provider.connection,
tokenOwnerRecord
)
console.log(this.client)

if (!torAccount.result) return
Expand Down

0 comments on commit ef25a26

Please sign in to comment.