datapay icon indicating copy to clipboard operation
datapay copied to clipboard

Small Bug in a code example in README File

Open scottscheper opened this issue 4 years ago • 0 comments

https://github.com/unwriter/datapay/blob/master/README.md#a-sending-from-data-and-pay

The code example under A. Sending from data and pay, currently is this:

const tx = {
  safe: true,
  data: ["0x6d02", "hello world"])
  pay: { key: "5JZ4RXH4MoXpaUQMcJHo8DxhZtkf5U5VnYd9zZH8BRKZuAbxZEw" }
}
datapay.send(tx, function(err, res) {
  console.log(res)
})

It's missing some commas and unnecessary parenthesis.

It should be this:

const tx = {
  safe: true,
  data: ["0x6d02", "hello world"],
  pay: { key: "5JZ4RXH4MoXpaUQMcJHo8DxhZtkf5U5VnYd9zZH8BRKZuAbxZEw" }
}
datapay.send(tx, function(err, res) {
  console.log(res)
})

scottscheper avatar Jun 05 '20 00:06 scottscheper