Update to Metadata v5 (#991)
* add v5 folder * Fixed typo in README * Updated tests to v5 * added v5 methods to MetadataVersioned * Added toV5 conversion file to v4 folder * change from v4 to v5 * Bump up version * Update imports in type-storage package * Switch to v5 imports in type-extrinsics, rpc-core and rpc-provider * 0.81.0 => 0.82.0 * Updating dependencies to 0.82.0 * update comments * Undo version bump * Remove release notes * v4 to v5 conversion * WIP tests * Addresses Amaurys comments * re-added conversion function * removed unused imports * Re-add string to HasherInput type * addresses failing derive tests * Fixed broken derive e2e tests * v5 tests * Update packages/types/src/Metadata/MetadataVersioned.ts Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com> * v3->v4 * trigger hung up travis build
This commit is contained in:
co-authored by
Amaury Martiny
parent
7bd2fcd7f9
commit
e4a97d4efd
@@ -6,7 +6,7 @@ import BN from 'bn.js';
|
||||
|
||||
import ApiRx from '@polkadot/api/rx/Api';
|
||||
import { ApiInterface$Rx } from '@polkadot/api/types';
|
||||
import { AccountId, AccountIndex, Balance, BlockNumber } from '@polkadot/types';
|
||||
import { AccountId, AccountIndex, Balance, BlockNumber, Index } from '@polkadot/types';
|
||||
import { WsProvider } from '@polkadot/rpc-provider';
|
||||
|
||||
const WS_LOCAL = 'ws://127.0.0.1:9944/';
|
||||
@@ -116,6 +116,7 @@ describe.skip('derive e2e', () => {
|
||||
api.derive.balances.all(ID).subscribe((balances) => {
|
||||
expect(balances).toEqual(expect.objectContaining({
|
||||
accountId: expect.any(AccountId),
|
||||
accountNonce: expect.any(Index),
|
||||
availableBalance: expect.any(Balance),
|
||||
freeBalance: expect.any(Balance),
|
||||
lockedBalance: expect.any(Balance),
|
||||
@@ -207,13 +208,8 @@ describe.skip('derive e2e', () => {
|
||||
});
|
||||
|
||||
describe('derive.staking', () => {
|
||||
describe('intentionsBalances', () => {
|
||||
it('returns the intentions with balances', async (done) => {
|
||||
api.derive.staking.intentionsBalances().subscribe((balances) => {
|
||||
expect(Object.keys(balances as object)).not.toHaveLength(0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
describe('controllers', () => {
|
||||
// @TODO
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user