-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
Bug
multisigCreateV2 in @sqds/multisig@2.1.4 crashes when treasury is passed as null:
TypeError: null is not an object (evaluating 'pubkey.toBase58')
Why
treasury is passed directly as an account key to createMultisigCreateV2Instruction, which calls .toBase58() on it. Unlike configAuthority (which is serialized via beet.coption and handles null correctly), treasury is a required account — but the function signature doesn't make this obvious.
// From the SDK source:
function multisigCreateV2({ treasury, creator, ... }) {
return createMultisigCreateV2Instruction(
{
programConfig: programConfigPda,
treasury, // <-- account key, crashes if null
creator,
createKey,
multisig: multisigPda
},
...
);
}Expected
Either:
- TypeScript types should mark
treasuryasPublicKey(not optional/nullable), OR - The SDK should handle null gracefully (e.g. default to
SystemProgram.programIdor the creator)
Workaround
Pass a valid PublicKey (e.g. the creator address) instead of null:
multisig.instructions.multisigCreateV2({
treasury: creator, // not null
rentCollector: creator,
configAuthority: PublicKey.default,
// ...
});Environment
@sqds/multisig@2.1.4@solana/web3.js@1.x- Browser (Next.js client-side)
/cc @metasal1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels