Skip to content

Commit

Permalink
make paylaod order dependeant
Browse files Browse the repository at this point in the history
  • Loading branch information
JettTech committed Feb 3, 2024
1 parent 7608ef7 commit 5d97c79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/services/servicelogApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export async function hAppStats(payload, signature, pubkey, environment, service

export async function allHappStats(payload, signature, pubkey, environment, serviceLogPort) {
try {
console.log('PAYLOAD that was signed: ', payload)
const happIds = JSON.parse(payload.payload.happ_ids)
const result = await serviceLogApiCall({
params: { happ_ids: happIds, days: payload.payload.days },
Expand Down
2 changes: 1 addition & 1 deletion src/stores/useHoloStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const makeUseHoloStore = ({ connectionArgs, MockWebSdk }) => defineStore('holo',
// NB: The happ_ids param needs to be a string to succeed the msgpack serialization
// and validation check in the server.
const happIdsString = JSON.stringify(happIds)
const payload = generateServiceLogPayload({ "happ_ids": happIdsString, "days": days.toString() })
const payload = generateServiceLogPayload({ "days": days.toString(), "happ_ids": happIdsString })
const { _, signature } = await client.signPayload(payload)
const hAppStatistics = await allHappStats(payload, signature, this.agentKey, environment, serviceLogPort)

Expand Down

0 comments on commit 5d97c79

Please sign in to comment.