run prettier format

This commit is contained in:
Fred K. Schott
2019-12-17 10:35:59 -08:00
parent 64e0d098e7
commit 2145c104fd
174 changed files with 4152 additions and 3228 deletions

View File

@@ -1,53 +1,56 @@
import Connection from '../../src/common/connection';
import Connection from '../../src/common/connection'
const request1 = {
command: 'server_info'
};
}
const request2 = {
command: 'account_info',
account: 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59'
};
}
const request3 = {
command: 'account_info'
};
}
const request4 = {
command: 'account_info',
account: 'invalid'
};
}
function makeRequest(connection, request) {
return connection.request(request).then((response) => {
console.log(request);
console.log(JSON.stringify(response, null, 2));
}).catch((error) => {
console.log(request);
console.log(error);
});
return connection
.request(request)
.then(response => {
console.log(request)
console.log(JSON.stringify(response, null, 2))
})
.catch(error => {
console.log(request)
console.log(error)
})
}
function main() {
const connection = new Connection('wss://s1.ripple.com');
const connection = new Connection('wss://s1.ripple.com')
connection.connect().then(() => {
console.log('Connected');
console.log('Connected')
Promise.all([
makeRequest(connection, request1),
makeRequest(connection, request2),
makeRequest(connection, request3),
makeRequest(connection, request4)
]).then(() => {
console.log('Done');
});
connection.getLedgerVersion().then(console.log);
console.log('Done')
})
connection.getLedgerVersion().then(console.log)
connection.on('ledgerClosed', ledger => {
console.log(ledger);
connection.getLedgerVersion().then(console.log);
});
connection.hasLedgerVersions(1, 100).then(console.log);
connection.hasLedgerVersions(16631039, 16631040).then(console.log);
});
console.log(ledger)
connection.getLedgerVersion().then(console.log)
})
connection.hasLedgerVersions(1, 100).then(console.log)
connection.hasLedgerVersions(16631039, 16631040).then(console.log)
})
}
main();
main()