magicblock-labs / magicblock-labs/bolt
[Bug] ApplySystem uses network when it shouldn't
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 64
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
`ApplySystem` should simply return an instruction while it internally uses a provider.
```typescript
provider.ts:91 Uncaught (in promise) Error: Provider local is not available on browser.
at AnchorProvider.local (provider.ts:91:1)
at getProvider (provider.ts:416:1)
at new Program (index.ts:281:1)
at transactions.ts:333:1
at step (index.ts:87:1)
at Object.next (index.ts:87:1)
at index.ts:87:1
at new Promise ()
at __webpack_modules__../node_modules/@magicblock-labs/bolt-sdk/lib/world/transactions.js.__awaiter (index.ts:87:1)
at createApplySystemInstruction (transactions.ts:331:1)
```
**To Reproduce**
Call `ApplySystem`
**Expected behavior**
It should simply return the Instruction and a Transaction with the Instruction
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at transactions.ts:331 and the createApplySystemInstruction call shown in the stack trace, then reproduce the issue by calling ApplySystem in a browser. Trace why provider setup reaches the unavailable local provider; done means ApplySystem returns the Instruction and a Transaction without requiring that browser-incompatible provider.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100