Skip to content

v4.0.0 Bug: "value.split is not a function" in orderMints() - Browser Environment #1066

@alexandreelkhoury

Description

@alexandreelkhoury

Bug Description

Orca SDK v4.0.0 throws TypeError: value.split is not a function when calling createConcentratedLiquidityPoolInstructions()
in browser environment.

Error Stack Trace

TypeError: value.split is not a function or its return value is not iterable
at partitionLeadingZeroes2 (chunk-OLWD2N6Q.js:1614:43)
at Object.getSizeFromValue (chunk-OLWD2N6Q.js:1573:42)
at getEncodedSize2 (chunk-OLWD2N6Q.js:1466:63)
at Object.encode (chunk-OLWD2N6Q.js:1472:36)
at assertIsAddress (chunk-OLWD2N6Q.js:2359:32)
at address (chunk-OLWD2N6Q.js:2368:3)
at orderMints (@orca-so_whirlpools.js:7539:45)

Reproduction Code

await setWhirlpoolsConfig('solanaDevnet');
await setRpc('https://api.devnet.solana.com');
await setDefaultFunder(wallet.publicKey.toString());

const result = await createConcentratedLiquidityPoolInstructions(
  "So11111111111111111111111111111111111111112", // WSOL
  "52oKNEQzbFtsYjxJu8MtMurcAA7uzgeMMaYPQB5BARhi", // Custom token
  128,
  10000
);

Environment

- SDK Version: @orca-so/whirlpools@4.0.0
- Web3.js Version: @solana/web3.js@2.0.0
- Platform: Browser (Chrome/Firefox)
- Wallet: Phantom, Solflare

Additional Context

- Error appears to be in orderMints function trying to call .split() on non-string value
- v4.0.0 published 1 week ago
- This is a regression - functionality should work as shown in documentation
- v4.0.0 is required for Web3.js v2.0.0 compatibility

Impact

- Blocking concentrated liquidity pool creation in browser environments
- No workaround available since older versions incompatible with Web3.js v2.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions