Skip to content

Commit

Permalink
fix drift access b4 initialization.. oops (#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
asktree committed May 14, 2024
1 parent 210fc8f commit b1e1273
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DriftStakeVoterPlugin/DriftVoterClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ export class DriftVoterClient extends Client<DriftStakeVoter> {
const registrar = await this._fetchRegistrar(realm, mint)
const spotMarketIndex = registrar.spotMarketIndex // could just hardcode spotmarket pk
const driftProgramId = registrar.driftProgramId // likewise
const drift = new Program(DriftIDL, driftProgramId, this.program.provider)

//const drift = new Program(DriftIDL, driftProgramId, this.program.provider)
const spotMarketPk = await getSpotMarketPublicKey(
driftProgramId,
Expand Down Expand Up @@ -181,7 +183,6 @@ export class DriftVoterClient extends Client<DriftStakeVoter> {
const insuranceFundVaultPkOrNull =
insuranceFundVault.found === false ? null : insuranceFundVaultPk

const drift = new Program(DriftIDL, driftProgramId, this.program.provider)
let insuranceFundStake:
| Awaited<ReturnType<typeof drift.account.insuranceFundStake.fetch>>
| undefined
Expand Down

0 comments on commit b1e1273

Please sign in to comment.