Created
February 7, 2020 19:54
-
-
Save octalmage/d3e39e9508514e2c37fdf66c2f0c6717 to your computer and use it in GitHub Desktop.
Revisions
-
octalmage created this gist
Feb 7, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ const tx = await theWallet.transact({ actions: [{ account: 'blockarcade1', name: 'result', authorization: [{ actor: theAccount, permission: 'active', }], data: { customer_string: userID, result: !!result, jackpot: !!jackpotScored, row, score, }, }], }, { blocksBehind: 10, expireSeconds: 30, }); // Pull the inline call to the reciept method and use that for the response. let state = tx.processed.action_traces[0].inline_traces[0].act.data; // When the user wins the reciept call with be after paying the user, so we want the second action. if (typeof state.from !== 'undefined') { state = tx.processed.action_traces[0].inline_traces[1].act.data; }