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
treasury as PublicKey (not optional/nullable), OR
- The SDK should handle null gracefully (e.g. default to
SystemProgram.programId or 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
Bug
multisigCreateV2in@sqds/multisig@2.1.4crashes whentreasuryis passed asnull:Why
treasuryis passed directly as an account key tocreateMultisigCreateV2Instruction, which calls.toBase58()on it. UnlikeconfigAuthority(which is serialized viabeet.coptionand handles null correctly),treasuryis a required account — but the function signature doesn't make this obvious.Expected
Either:
treasuryasPublicKey(not optional/nullable), ORSystemProgram.programIdor the creator)Workaround
Pass a valid PublicKey (e.g. the creator address) instead of null:
Environment
@sqds/multisig@2.1.4@solana/web3.js@1.x/cc @metasal1