diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fc24e0eb6..87b8ec6575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changes: +- When cloning an API instance the runtimeChain is now properly set from source - Allow `paymentInfo` on any extrinsic (already signed) with optional `{ blockHash: }` param for historic queries - Optimize derive `receivedHeartbeats` to not re-create the full object - Add `staking.stakerPrefs` derive to retrieve validatorPrefs over a range of eras diff --git a/packages/api/src/base/Init.ts b/packages/api/src/base/Init.ts index 49a18a4f9c..666b98a8d1 100644 --- a/packages/api/src/base/Init.ts +++ b/packages/api/src/base/Init.ts @@ -161,6 +161,7 @@ export default abstract class Init extends Decorate): Promise { this._extrinsicType = source.extrinsicVersion; + this._runtimeChain = source.runtimeChain; this._runtimeVersion = source.runtimeVersion; this._genesisHash = source.genesisHash; this.registry.setChainProperties(source.registry.getChainProperties()); diff --git a/packages/api/src/base/index.ts b/packages/api/src/base/index.ts index 8e233164e8..597ddfaca0 100644 --- a/packages/api/src/base/index.ts +++ b/packages/api/src/base/index.ts @@ -7,7 +7,7 @@ import { Hash, RuntimeVersion } from '@polkadot/types/interfaces'; import { CallFunction, RegistryError, SignerPayloadRawBase } from '@polkadot/types/types'; import { ApiInterfaceRx, ApiOptions, ApiTypes, DecoratedRpc, DecorateMethod, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics, Signer } from '../types'; -import { Metadata } from '@polkadot/types'; +import { Metadata, Text } from '@polkadot/types'; import { assert, isString, isUndefined, u8aToHex, u8aToU8a } from '@polkadot/util'; import Init from './Init'; @@ -193,6 +193,13 @@ export default abstract class ApiBase extends Init