Adjust support fo US English as per substrate (#811)
* Rename ExtinsicStatus Finalised -> Finalized * Finalised heads -> Finalized
This commit is contained in:
@@ -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 } }) => {
|
||||
|
||||
Reference in New Issue
Block a user