diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 09e1d4c..0c2fe48 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -12,15 +12,15 @@ jobs: node-version: [16] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: - version: 7 + version: 8 - name: Install, build and test timeout-minutes: 5 run: | diff --git a/src/util/anchor.ts b/src/util/anchor.ts index 0b2cd0a..6c5851b 100644 --- a/src/util/anchor.ts +++ b/src/util/anchor.ts @@ -100,7 +100,11 @@ export async function getParsedStakeAccountInfo( ) } - if (!stakeAccountInfo.data || stakeAccountInfo.data instanceof Buffer) { + if ( + !stakeAccountInfo.data || + stakeAccountInfo.data instanceof Buffer || + !('parsed' in stakeAccountInfo.data) + ) { throw new Error('Failed to parse the stake account data') }