Broadcasting limit_order_create2 operation fails
Tried with the following code
const op1 = [
"limit_order_create",
{
owner: "arcange",
orderid: 1,
amount_to_sell: "1.000 HIVE",
min_to_receive: "1.000 HBD",
fill_or_kill: false,
expiration: new Date(Date.now()+(27*24*60*60*1000)).toISOString().substring(0,19)
}
]
const op2 = [
"limit_order_create2",
{
owner: "arcange",
orderid: 1,
amount_to_sell: "1.000 HIVE",
exchange_rate: {
base: "1.000 HIVE",
quote: "1.000 HBD"
},
fill_or_kill: false,
expiration: new Date(Date.now()+(27*24*60*60*1000)).toISOString().substring(0,19)
}
]
const privateKey = PrivateKey.from("5.....")
const res1 = await hiveClient.broadcast.sendOperations([op1], privateKey) // -> OK
const res2 = await hiveClient.broadcast.sendOperations([op2], privateKey) // -> NOK
Broadcasting op1 works fine. Broadcasting op2 throw the following error:
stack: 'RPCError: Missing Active Authority arcange auth={"weight_threshold":1,"account_auths":[],"key_auths":[["STM73LpidmG3uqwBpT8v6hDAkHKae7h9WnoMt6v46qah1FEyvtXya",1]]} owner={"weight_threshold":1,"account_auths":[],"key_auths":[["STM7VeCSYUvrKkXz2uDgEHjgUvq32HwP4kZ9p4eGJqK2yHKaJzTXF",1]]}
at Client.<anonymous> (.....\\node_modules\\@hiveio\\dhive\\lib\\client.js:201:23)