Make Extrinsic compatible with Method (#335)

* Make Extrinsic compatible with Method

* Remove Method -> methodIndex, only use callIndex
This commit is contained in:
Jaco Greeff
2018-10-22 12:10:39 +02:00
committed by GitHub
parent b3e9b2510b
commit 9f570cbbe9
8 changed files with 79 additions and 32 deletions
@@ -10,13 +10,14 @@ const keyring = testingPairs();
describe.skip('e2e transfer', () => {
let api;
let nonce;
beforeEach(async () => {
api = await Api.create();
nonce = await api.query.system.accountNonce(keyring.alice.address());
});
it('makes a transfer', async () => {
const nonce = await api.query.system.accountNonce(keyring.alice.address());
const hash = await api.tx.balances
.transfer(keyring.bob.address(), 12345)
.sign(keyring.alice, nonce)
@@ -26,4 +27,15 @@ describe.skip('e2e transfer', () => {
hash.toString()
).not.toEqual('0x');
});
it('makes a proposal', async () => {
const hash = await api.tx.democracy
.propose(api.tx.consensus.setCode('0xdeadbeef'), 10000)
.sign(keyring.alice, nonce)
.send();
expect(
hash.toString()
).not.toEqual('0x');
});
});