mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Updated library version on node js contract sample (#386)
This commit is contained in:
@@ -57,10 +57,25 @@ const echoContract = async (ctx) => {
|
||||
|
||||
// NPL messages example.
|
||||
// if (!ctx.readonly) {
|
||||
// ctx.unl.onMessage((node, msg) => {
|
||||
// console.log(msg + " from " + node.publicKey);
|
||||
// })
|
||||
// // Start listening to incoming NPL messages before we send ours.
|
||||
// const promise = new Promise((resolve, reject) => {
|
||||
// let timeout = setTimeout(() => {
|
||||
// reject('NPL timeout.');
|
||||
// }, 2000);
|
||||
|
||||
// let list = [];
|
||||
// ctx.unl.onMessage((node, msg) => {
|
||||
// console.log(`${node.publicKey} said ${msg} to me.`);
|
||||
// list.push(msg);
|
||||
// if (list.length == ctx.unl.list().length) {
|
||||
// clearTimeout(timeout);
|
||||
// resolve();
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
// await ctx.unl.send("Hello");
|
||||
// await promise;
|
||||
// }
|
||||
|
||||
// Update patch config
|
||||
|
||||
Reference in New Issue
Block a user