Skip to content

Commit

Permalink
fix: sendAsync format the response as jsonRPC (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
leanmendoza committed Jan 12, 2024
1 parent f99a1ed commit 8970b2c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,17 @@ module.exports.sendAsync = async function (message) {
throw new Error(`The Ethereum method "${message.method}" is not allowed on Decentraland Provider`)
}

return Deno.core.ops.op_send_async(message.method, message.jsonParams)
const resValue = await Deno.core.ops.op_send_async(message.method, message.jsonParams)

const result = {
id: message.id,
jsonrpc: "2.0",
result: resValue
}

return {
jsonAnyResponse: JSON.stringify(result)
}
}

module.exports.requirePayment = async function (body) {
Expand Down

0 comments on commit 8970b2c

Please sign in to comment.