You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Im getting "result: undefined" on my function.

Hello everyone.

Summary:

I'm calling a "functionX" on an Action Chain.

This function give me a value ( that I can check on Console ) but when I try to assign the function result to a variable it don't have any value.

  • I did this with another different functions before.


Code Snippet (add any code snippets that support your topic, if applicable):

functionX(arg1) {

async function hashWithSHA256(input) {

  const msgUint8 = new TextEncoder().encode(input);                  

  const hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8);         

  const hashArray = Array.from(new Uint8Array(hashBuffer));

  const hashHex = hashArray.map(b => ('00' + b.toString(16)).slice(-2)).join('');

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!