Adjust support fo US English as per substrate (#811)

* Rename ExtinsicStatus Finalised -> Finalized

* Finalised heads -> Finalized
This commit is contained in:
Jaco Greeff
2019-03-29 14:12:56 +01:00
committed by GitHub
parent 2528ac4bd5
commit 6fef86cc78
26 changed files with 193 additions and 111 deletions
@@ -36,11 +36,11 @@ async function main () {
api.tx.balances
.transfer(recipient, AMOUNT)
.sign(alicePair, { nonce })
.send(({ events = [], status, type }) => {
console.log('Transaction status:', type);
.send(({ events = [], status }) => {
console.log('Transaction status:', status.type);
if (type === 'Finalised') {
console.log('Completed at block hash', status.asFinalised.toHex());
if (status.isFinalized) {
console.log('Completed at block hash', status.asFinalized.toHex());
console.log('Events:');
events.forEach(({ phase, event: { data, method, section } }) => {
@@ -32,13 +32,13 @@ async function main () {
// preform the actual chain upgrade via the sudo module
api.tx.sudo
.sudo(proposal)
.signAndSend(adminPair, ({ events = [], status, type }) => {
console.log('Proposal status:', type);
.signAndSend(adminPair, ({ events = [], status }) => {
console.log('Proposal status:', status.type);
if (type === 'Finalised') {
if (status.isFinalized) {
console.error('You have just upgraded your chain');
console.log('Completed at block hash', status.asFinalised.toHex());
console.log('Completed at block hash', status.asFinalized.toHex());
console.log('Events:');
events.forEach(({ phase, event: { data, method, section } }) => {