You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i was studying aleo wallet through aleo-wallet-adapter.
And i found some error on 'Requesting Transactions' Code, which is here.
// The record here is an output from the Requesting Records above
const record = `'{"id":"0f27d86a-1026-4980-9816-bcdce7569aa4","program_id":"credits.aleo","microcredits":"200000","spent":false,"data":{}}'`
// Note that the inputs must be formatted in the same order as the Aleo program function expects, otherwise it will fail
const inputs = [JSON.parse(record), "aleo1kf3dgrz9...", `${amount}u64`];
the way you write record is javascript string literal because of ' ' , so JSON.Parse() is not working.
So i think it is better to remove ' ' , the result would be
Hello, i was studying aleo wallet through aleo-wallet-adapter.
And i found some error on 'Requesting Transactions' Code, which is here.
the way you write
record
is javascript string literal because of' '
, so JSON.Parse() is not working.So i think it is better to remove
' '
, the result would beconst record2 =
{"id":"0f27d86a-1026-4980-9816-bcdce7569aa4","program_id":"credits.aleo","microcredits":"200000","spent":false,"data":{}};
Thank you!
The text was updated successfully, but these errors were encountered: