* Combinator return unsubscribe/dispose function * Submittable extrinsics return UnsubFunction * RPC methods with unsub callback returns * Update changelog, bump version * CHANGELOG typo * Fix combinator unsubscribes * Be explicit in returns for UnsubFunction (combineLatest)
1.1 KiB
0.36.1
Api Promise has been updated in the way we deal with subscriptions. Previously a subscription returned Promise<number> where the caller was to keep track of the id and use it in subsequent unsubscribes. Now any subscriptions return an unsubscribe/destroy function (): void, that is use for removing the subscriptions, e.g.
const unsubscribe = api.query.balance.freeBalanceOf(Alice, (balance) => {...});
unsubscribe(); // here we destroy the subscription
0.35.1
Swapped to new metadata structures from Substrate. If the API is not working with your node, update Substrate to latest master branch. (Or 0.9.1 for Charred Cherry). Dropped support for old metadata as found as far back as BBQ Birch.
0.34.1
Changed the send signature (for future expansion of eg. events) to return result: { status: ExtrinsicStatus } instead of status: ExtrinsicStatus. For most cases where only status type checks are used, i.e. status.type === 'Finalised' this should not be a breaking change. Deep inspection of the status object however will need to adapt.