Recover the timepoint for a pending Substrate multisig approval
A repeated call hash is insufficient to identify one multisig operation over its lifetime. Later approvers must refer to the timepoint that opened the current operation.
Find the on-chain operation
Use an initialized polkadot-js API for the intended runtime. Supply the derived multisig account and the hash of the encoded inner call. The recorded when value contains the block number and extrinsic index of the opening approval.
const snapshot = await api.at(await api.rpc.chain.getFinalizedHead())
const operation = await snapshot.query.multisig.multisigs(multisigAddress, callHash)
if (operation.isSome) {
const record = operation.unwrap()
console.log(record.when.toJSON(), record.approvals.toJSON())
}
Carry the exact opening position into the next approval
If when contains height 900 and index 4, both values belong to the opening operation. Substituting the latest finalized height, or an event’s index in the block event array, yields a different timepoint. Check existing approvals before requesting another signature from the same signer.
An empty storage result can mean completion, cancellation or a mismatched account and call hash. Reconcile historical multisig events before interpreting an empty entry as an invitation to start a new operation.